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.

DarkBASIC Professional Discussion / help with point & click movement using sparky's

Author
Message
Lasalle
18
Years of Service
User Offline
Joined: 17th Dec 2007
Location:
Posted: 9th May 2010 20:30 Edited at: 9th May 2010 20:40
Hey Guys,
in my program I have an MMO/RTS style cam set up that allows you to orbit your character when you hold mouse2 and allows you to perform a point and click movement on mouse 1. After some doing, Ive managed to use spark's dll to get my character to walk on a modeled terrain .x object. Admittedly Im new to using sparky's and Ive spent a few hours trying to figure out the examples with marginal success.

My #1 problem is this: the waypoint point and click system works fine for movement but I cant get the waypoint object to follow the .x terrain. any thoughts on process,setup, etc.. is greatly appreciated.
here is an image to illustrate the waypoint problem.



this is the code Im using for waypoint control it might look familiar to someone, as I found it in an example:


heres the function that positions the player object (2):


problem #2
how do I get my character to face JUST the Y direction of the waypoint object. Currently using

but this doesnt keep my main character verticle if the waypoint is at another height.

any help is greatly appreciated.
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 10th May 2010 01:01
For problem #2 just use point object but only point to the X and Z values of the waypoint object.


If it hasn't exploded yet, I haven't touched it.
Lasalle
18
Years of Service
User Offline
Joined: 17th Dec 2007
Location:
Posted: 10th May 2010 02:02
thank you very much.. and I was able to solve problem 1 as well..I replaced that math heavy code with the following and it worked perfect..!

Login to post a reply

Server time is: 2026-07-26 04:28:09
Your offset time is: 2026-07-26 04:28:09