Jump to content


Photo
- - - - -

3D gravity and you- An educational tutorial


  • Please log in to reply
1 reply to this topic

#1 howabout

howabout

    GMC Member

  • GMC Member
  • 99 posts

Posted 31 March 2012 - 05:50 PM

  • Title: 3D gravity and you, the basics.
  • Description: How to make and understand 3D gravity.
  • GM Version: :GM81: :GM8:
  • Registered: Yes
  • File Type: .zip
  • File Size: 19.9 kb
  • File Link: http://www.host-a.ne...GRAVITY TUT.zip
  • Required Extensions: None
  • Required DLLs: None
Summary
This tutorial helps you understand gravity, and put it to use in your 3D game aswell as a slight tutorial on 3D z collisions.
  • 0

#2 marfin201

marfin201

    GMC Member

  • New Member
  • 170 posts
  • Version:GM8

Posted 02 July 2012 - 04:45 AM

Nice tutorial,, !! :biggrin:
Ok, I want to ask something...
actually this is dumb question ...I just want to make sure that platform is a floor....right ?
And then,,
if place_meeting(x,y,platform)
{
if !z<platform.z
{
if z>platform.z-16
{
if z<platform.z
{
z=platform.z
zspeed=0
zgravity=0
}
}
}
}
else zgravity=0.25
if place_meeting(x,y,platform)
{
if zspeed>0 
{
if z<platform.z
{
zspeed=0
}
}
}

On that code, I guess that's for collision with obj_floor, isn't it ??
alright,, actually I almost success to make a gravity but I have 1 step left behind,,
thx for the tutorial.... :thumbsup:
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users