Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (vicknick, howardR, sleakz), 674 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Finding Gaps #466284
06/06/17 04:37
06/06/17 04:37
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline OP
Serious User
jumpman  Offline OP
Serious User

Joined: Apr 2002
Posts: 1,246
ny
Hi everyone,

does anyone have any pseudo code or theory when it comes to finding gaps in the floor for jumping? I have a simple AI that moves in a straight line towards its target, and I just want it to be able to jump over gaps. Is there a way to find the gap in the floor? Whether the floor is block/model?

I currently already have a crude gap checking script, which uses vec_lerp and traces within a loop. It works ok, but I wanted to know if there was a more elegant way.

Re: Finding Gaps [Re: jumpman] #466286
06/06/17 06:05
06/06/17 06:05
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 868
Chicago, IL
c_trace?

Maybe have it check which floor level the trace hits. If it hits the lower level - i.e. it reaches the gap, then it goes into jump mode. When it hits the higher level, it continues to do the normal, non-jumping movement.

Re: Finding Gaps [Re: Dooley] #466289
06/06/17 09:52
06/06/17 09:52
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
I once made movement code with auto jumping (for player, but it's the same way for AI too I guess). It used to work with c_trace as well. If you will be interested, you can find it on my webpage under downloads.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | 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