Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 06-08-2016, 04:19 AM
Tyen05
Discordant
 
Join Date: Mar 2009
Location: eqbrowser.com
Posts: 309
Default

If you fall underneath world, it'll toss you to safe spot. Also tossed some more pathing stuff for debug purposes. Bunch of other stuff not listed, but this was kinda neat.

My step distance (currently set to 1) is wrong. So the wandering speed/steps in between the two points is not correct.

https://youtu.be/WpsF61JyttM

Code:
Vector3 targetPosition = new Vector3 (movetoX,movetoY,movetoZ);
Vector3 deltaF = new Vector3 (deltaX,deltaY,deltaZ);

if (deltaF.magnitude != 0) 
	{
		//step = delta time x speed. The server is calculating the speed which is represented as the magnitude of vector x y z. Translate the game object by those deltas multiplied by delta time	
		float step = deltaF.magnitude * Time.deltaTime;
		transform.position = Vector3.MoveTowards(this.gameObject.transform.position, targetPosition, 1);

		Debug.DrawRay (this.gameObject.transform.position, (targetPosition - this.gameObject.transform.position), Color.green);
	}
__________________
Browser based EQ project
Reply With Quote
 

Tags
pras eqbrowser.com, unity3d


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:31 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3