About Store Forum Documentation Contact
Donations:
327$/mo



Post Reply 
Waypoint and Animation
Author Message
djpercy Offline
Member

Post: #1
Waypoint and Animation
Hello,

I have a waypoint with a start and endpoint.
first the character moved to the startpoint, but he move not to the endpoint.
The time is to short. When I set down the time, the animation go not the full animation cycle.

How work the waypoint with a character animation. Here is my code:
PHP Code:
...
 if(
Game::Waypoint *waypoint=Game::World.findWaypoint(Name)) 
  {
      
point=waypoint->length();
    
wpos=waypoint->pos (Time.time()*2); 
  } 
  return 
wpos  
.....
  
//Move the player with animation
  
move_walking=true;
  
actionMoveTo(wpos);
.... 

Greeting Denis
(This post was last modified: 12-13-2011 12:23 AM by djpercy.)
12-13-2011 12:22 AM
Find all posts by this user Quote this message in a reply
djpercy Offline
Member

Post: #2
RE: Waypoint and Animation
Hallo,

have you no solution for this, please Help me.

Greetings Denis
12-15-2011 12:53 PM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #3
RE: Waypoint and Animation
You can't use actionMoveTo with waypoint->pos(Time.time()*2). Have a good look over the Waypoints tutorial.
12-16-2011 03:04 AM
Find all posts by this user Quote this message in a reply
djpercy Offline
Member

Post: #4
RE: Waypoint and Animation
Hello,

what i need for a Character animation between the waypoints? In the waypoint tutorial move a red dot betwenn the points. Can't see it what you mean, sorry.


Greetings Denis
12-16-2011 09:00 AM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #5
RE: Waypoint and Animation
actionMoveTo takes a discrete position to move the character to, invoking the pathfinder each time.

waypoint->pos(Time.time()*2) is an interpolated position along a path of waypoints. You can't pathfind to this position (...well you could, but not in your case).
12-16-2011 10:14 AM
Find all posts by this user Quote this message in a reply
djpercy Offline
Member

Post: #6
RE: Waypoint and Animation
Hello,

many thanks.
ok i saw. I'am in the wrong tutorial i have found the right. :-)
13 - Character Default Animations.cpp
PHP Code:
if(waypoint && waypoint->points.elms()) // if have waypoint with some points in it
         
{
            
move_to=(move_to+1)%waypoint->points.elms(); // set variable to next point index
            
actionMoveTo(waypoint->points[move_to].pos); // order the character to move to the point position
         

Greeting Denis
(This post was last modified: 12-16-2011 10:20 AM by djpercy.)
12-16-2011 10:14 AM
Find all posts by this user Quote this message in a reply
djpercy Offline
Member

Post: #7
RE: Waypoint and Animation
Hello,

sorry, i have one Question :-) When i position the waypoint and a Chr in my World and
i start my script for the waypoint animation, my Chr is Humann from EE has the wrong direction along the waypoint. He walk sideways instead of forward. When i add a chr in the Tutorial World near the waypoint is all correct. What is wrong in my world?

Greetings Denis
(This post was last modified: 12-17-2011 01:08 AM by djpercy.)
12-17-2011 01:00 AM
Find all posts by this user Quote this message in a reply
Post Reply