Quote: "I am trying to apply gravity to a 3d object but I can't seem to find any information on it. Could someone point me in the write direction? Thanks. "
If you check the theater sample that comes with the 108 beta so does it have gravity and sliding collision on the camera.
I suspect you want to have player gravity?
If you want some cool fake physics so can you use raycast bounce.
Baxslash made an cool snippet with 3d particles this way.
This sample make the 3d planes bounce of the main object
http://forum.thegamecreators.com/?m=forum_view&t=202537&b=41
This is how i do gravity on my dungeon sample.
rem Old position
oldx#=GetCameraX(1)
oldy#=GetCameraY(1)-10
oldz#=GetCameraZ(1)
rem Move camera
if GetRawKeyState(38)=1 or getvirtualjoysticky(1)<0.0-0.5 then MoveCameraLocalZ(1,moveSpeed#*GFT#)
if GetRawKeyState(40)=1 or getvirtualjoysticky(1)>0.0+0.5 then MoveCameraLocalZ(1,-moveSpeed#*GFT#)
if GetRawKeyState(37)=1 or getvirtualjoystickx(1)<0.0-0.5 then RotateCameraLocalY(1,-turnSpeed#*GFT#)
if GetRawKeyState(39)=1 or getvirtualjoystickx(1)>0.0+0.5 then RotateCameraLocalY(1,turnSpeed#*GFT#)
if GetRawKeyState(88)=1 then MoveCameraLocalX(1,moveSpeed#*GFT#)
if GetRawKeyState(90)=1 then MoveCameraLocalX(1,-moveSpeed#*GFT#)
rem New position
newx#=GetCameraX(1)
newy#=GetCameraY(1)-16.0
newz#=GetCameraZ(1)
CollisionPoint=ObjectSphereSlide(0,oldx#,oldy#,oldz#,newx#,newy#,newz#,16.0)
if CollisionPoint>0
if CollisionPoint<Entity_Enemy[0].ColliderId or CollisionPoint>Entity_Enemy[Enemy_Count].ColliderId
XPos#=GetObjectRayCastSlideX(0)
YPos#=GetObjectRayCastSlideY(0)+15.9
ZPos#=GetObjectRayCastSlideZ(0)
Gravity#=0.0
else
XPos#=GetCameraX(1)
YPos#=GetCameraY(1)
ZPos#=GetCameraZ(1)
Gravity#=40.0*GFT#
endif
else
XPos#=GetCameraX(1)
YPos#=GetCameraY(1)
ZPos#=GetCameraZ(1)
Gravity#=40.0*GFT#
endif
SetCameraPosition(1,XPos#,YPos#-Gravity#,ZPos#)
To make the player jump do you simply give gravity a negative value like -40*GFT#
GFT# is getframetime()
I hope it helps.
Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz