HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] GetWaypointRotation  (Read 1347 times)

AlderonGames

  • World Owners
  • ****
  • Posts: 20
    • View Profile
[Resolved] GetWaypointRotation
« on: Apr 08, 13, 08:10:34 AM »

Hi,

I was wondering, How can I get the rotation of a waypoint.

I was hoping there would be a external function like GetWaypointLocation called GetWaypointRotation but it doesn't seem to exist.

Thanks,
Matthew
« Last Edit: Apr 09, 13, 01:26:56 PM by HE-Cooper »
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1155
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: GetWaypointRotation
« Reply #1 on: Apr 08, 13, 03:43:05 PM »

A few functions in the _externalfunctions on client side under the "show engine" . I did not check to see if they have been deprecated. Some might be. I found some in another area also deprecated, but not marked as such. I am not sure if they contain rotational values.

external function GetPathByName(name as String) as NodeRef
external function GetWaypointLocation(pathNode as NodeRef, ID as ID) as Vector3
external function GetWaypointData(pathNode as NodeRef, ID as ID) as String
external function GetStartWaypoint(pathNode as NodeRef) as ID
external function GetNextWaypoint(pathNode as NodeRef, ID as ID) as ID
external function GetPrevWaypoint(pathNode as NodeRef, ID as ID) as ID
external function GetEndWaypoint(pathNode as NodeRef) as ID
external function GetNearestWaypoint(pathNode as NodeRef, location as Vector3) as ID

// returns a list of all waypoint IDs, in order, for the given path (equivalent to building a list from GetFirstWaypoint() and GetNextWaypoint())
external function GetWaypoints(path as NodeRef) as List of ID 
external function SetWaypointData(path as NodeRef, waypoint as ID, data as String)
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1155
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: GetWaypointRotation
« Reply #2 on: Apr 08, 13, 03:43:25 PM »

nm (clicked quote instead of modify)
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: GetWaypointRotation
« Reply #3 on: Apr 08, 13, 06:05:58 PM »

Matthew, are you intending to do this on the client or server side?
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

AlderonGames

  • World Owners
  • ****
  • Posts: 20
    • View Profile
Re: GetWaypointRotation
« Reply #4 on: Apr 08, 13, 09:53:55 PM »

Matthew, are you intending to do this on the client or server side?

Client Side.
Logged

Jrome90

  • General Accounts
  • *
  • Posts: 330
    • View Profile
Re: GetWaypointRotation
« Reply #5 on: Apr 08, 13, 11:14:53 PM »

This works

Code: [Select]
 
path as ID = 0//Path ID Here
  waypoints as List of ID = GetWaypoints(path)
  foreach waypoint in waypoints
    rot as Vector3 = GetNodeRotation(waypoint)
    println("Waypoint Rotation: " + rot)
  .
Logged