Programming & Scripting

View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

User avatar   Hardcore Modder Hardcore ModderMember since: 16.06.2010, 11:41Posts: 868Location: West Lafayette, Indiana Likes: 0
 

 Post Topic: Location of the code calling the application of gravity
PostPosted 02.02.2012, 18:39 
Hello,
I'm trying to make something similar to gravity boots, and I was wondering where the call is to applying gravity to a physical entity.

User avatar   Hardcore Modder Hardcore ModderMember since: 16.06.2010, 11:41Posts: 868Location: West Lafayette, Indiana Likes: 0
 

 Post Topic: Re: Location of the code calling the application of gravity
PostPosted 03.02.2012, 12:54 
Ok, so I found a function called UpdateGravity, which handles gravity in freefall, but I'm more going towards what makes the car cling to the road.
User avatar   Crytek Staff Member Crytek Staff MemberMember since: 09.01.2008, 01:11Posts: 11250Location: Crytek HQ Likes: 836
 

 Post Topic: Re: Location of the code calling the application of gravity
PostPosted 03.02.2012, 13:02 
Code:
p_gravity_z = -13
:)

Defined in: SDK\Engine\Engine.pak\Config\CVarGroups\sys_spec_Physics.cfg



Image
Image
No dev/modding PM's please, use the forums! :)
Achievement Unlocked: Wear the Winter avatar all year.
User avatar   Hardcore Modder Hardcore ModderMember since: 16.06.2010, 11:41Posts: 868Location: West Lafayette, Indiana Likes: 0
 

 Post Topic: Re: Location of the code calling the application of gravity
PostPosted 03.02.2012, 16:44 
ok, but that would be for constant axis directional gravity, I want to make it object specific (or disable it for an object and apply my own) and be able to apply it in any direction. Also, that is for the entire physical world, if I did make it controlled via script, then everything would follow a single object's gravitational vector.
User avatar   Crytek Staff Member Crytek Staff MemberMember since: 09.01.2008, 01:11Posts: 11250Location: Crytek HQ Likes: 836
 

 Post Topic: Re: Location of the code calling the application of gravity
PostPosted 03.02.2012, 17:07 
Ah ok, sorry, thought you meant global. Have you looked at how it was done for C1?



Image
Image
No dev/modding PM's please, use the forums! :)
Achievement Unlocked: Wear the Winter avatar all year.
User avatar   Hardcore Modder Hardcore ModderMember since: 16.06.2010, 11:41Posts: 868Location: West Lafayette, Indiana Likes: 0
 

 Post Topic: Re: Location of the code calling the application of gravity
PostPosted 03.02.2012, 17:29 
No, I can't find the function(s). That is what I am asking for.

EDIT: Oh did you mean gravity boots for C1? No, I don't have the code source and the downloads section is non-existent.
User avatar   Has no life Has no lifeMember since: 11.07.2008, 20:25Posts: 11740Location: Nottingham, UK Likes: 90
 

 Post Topic: Re: Location of the code calling the application of gravity
PostPosted 03.02.2012, 18:30 
You mean this download? Source code for Gravity Boots 0.9.6.1


Out now! CryENGINE Game Programming with C++, C#, and Lua
Ex-Crytek, now with Deep Silver Dambuster Studios
User avatar   Hardcore Modder Hardcore ModderMember since: 16.06.2010, 11:41Posts: 868Location: West Lafayette, Indiana Likes: 0
 

 Post Topic: Re: Location of the code calling the application of gravity
PostPosted 03.02.2012, 18:48 
Thank You!!! Perks of having the website source, I guess.
User avatar   Has no life Has no lifeMember since: 11.07.2008, 20:25Posts: 11740Location: Nottingham, UK Likes: 90
 

 Post Topic: Re: Location of the code calling the application of gravity
PostPosted 03.02.2012, 18:54 
Perks of seeing the download link in the footer with the old DDB ;)

downloads.php


Out now! CryENGINE Game Programming with C++, C#, and Lua
Ex-Crytek, now with Deep Silver Dambuster Studios
User avatar   Hardcore Modder Hardcore ModderMember since: 16.06.2010, 11:41Posts: 868Location: West Lafayette, Indiana Likes: 0
 

 Post Topic: Re: Location of the code calling the application of gravity
PostPosted 03.02.2012, 18:56 
OH, thanks some more.