Updated Lua examples
Most of the examples already working! Only some of them still fail, mostly related to data arrays...
This commit is contained in:
parent
7f9513fbf4
commit
865b216ebe
17 changed files with 69 additions and 78 deletions
|
@ -41,7 +41,7 @@ SetTargetFPS(60) -- Set our game to run at 60 frames-per-secon
|
|||
while not WindowShouldClose() do -- Detect window close button or ESC key
|
||||
-- Update
|
||||
---------------------------------------------------------------------------------------
|
||||
UpdateCamera(camera) -- Update internal camera and our camera
|
||||
camera = UpdateCamera(camera) -- Update internal camera and our camera
|
||||
|
||||
if (IsMouseButtonPressed(MOUSE.LEFT_BUTTON)) then
|
||||
-- NOTE: This function is NOT WORKING properly!
|
||||
|
@ -49,8 +49,10 @@ while not WindowShouldClose() do -- Detect window close button or ESC
|
|||
|
||||
-- Check collision between ray and box
|
||||
collision = CheckCollisionRayBox(ray,
|
||||
(BoundingBox)((Vector3)(cubePosition.x - cubeSize.x/2, cubePosition.y - cubeSize.y/2, cubePosition.z - cubeSize.z/2),
|
||||
(Vector3)(cubePosition.x + cubeSize.x/2, cubePosition.y + cubeSize.y/2, cubePosition.z + cubeSize.z/2)))
|
||||
BoundingBox(Vector3(cubePosition.x - cubeSize.x/2, cubePosition.y - cubeSize.y/2, cubePosition.z - cubeSize.z/2),
|
||||
Vector3(cubePosition.x + cubeSize.x/2, cubePosition.y + cubeSize.y/2, cubePosition.z + cubeSize.z/2)))
|
||||
|
||||
--print("collision check:", collision)
|
||||
end
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue