Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (OptimusPrime, AndrewAMD), 14,580 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to scan terrain so player cant climb steep hills? #253662
02/25/09 22:33
02/25/09 22:33
Joined: Feb 2009
Posts: 5
S
SlapGW Offline OP
Newbie
SlapGW  Offline OP
Newbie
S

Joined: Feb 2009
Posts: 5
I need to be able to scan the terrain in front of my player. If the terrain is too steep, my player should be unable to walk up. Can anyone give me a general guideline on what my code should look like to accomplish this? Thanks

Re: How to scan terrain so player cant climb steep hills? [Re: SlapGW] #253670
02/25/09 23:27
02/25/09 23:27
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Put an invisible blocks.

Re: How to scan terrain so player cant climb steep hills? [Re: Cowabanga] #253768
02/26/09 17:31
02/26/09 17:31
Joined: May 2008
Posts: 331
Lithuania, Vilnius
Jaxas Offline
Senior Member
Jaxas  Offline
Senior Member

Joined: May 2008
Posts: 331
Lithuania, Vilnius
use c_trace in front of your player smile


The smaller the bug, the harder it is to kill.
_________________________________________
Forklift DEMO (3dgs)
Re: How to scan terrain so player cant climb steep hills? [Re: Jaxas] #253821
02/27/09 04:51
02/27/09 04:51
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Ive never tried this but if you check the "normal" variable after a c-trace
in the forward direction, you can get the angle of the surface ahead of you with
some processing like vec_to_angle(tempVec,normal); or something.
If the (tempVec) x or y angle is to steep (say > 45 degrees),
then block the movement somehow.

Hope this is of some use.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1