Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / [3D] Character and obstacle

Author
Message
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 14th Nov 2015 18:44
Hi

I'm looking for an 3D example or code to understand how to stop a character moving when he meet an obstacle.
Do you know how I can do that in 3D ?

Thanks.
http://www.dracaena-studio.com
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 14th Nov 2015 21:11 Edited at: 14th Nov 2015 21:12
Hi,

Try the example code from the documentation for ObjectSphereSlide
http://www.appgamekit.com/documentation/Reference/3D/ObjectSphereSlide.htm

Using AGKv2 Tier1
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 15th Nov 2015 09:46 Edited at: 16th Nov 2015 20:20
Hi

Thank you for your answer.
This example is great.

I have tried to adapt it for my code, but it doesn't work properly.
In some case, the sphere doesn"t move smoothly, and didn't take care of the 2 first box (the sphere check only the last box for collision).

Here is my code (I need a sort of "click and go" (sort of simple pathfinding, not a complexe A* ^^)


Do you have an idea how I can fixe that ?
Thanks again

EDIT :
OK, I have found a temporary solution ^^
I use a little radius for the raycast and some other changes. It's not perfect at all, but it work in some situation.
http://www.dracaena-studio.com

Login to post a reply

Server time is: 2024-04-26 10:15:38
Your offset time is: 2024-04-26 10:15:38