• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
lucky6969b

Orientation trouble

17 posts in this topic

Hello guys,

The code snippet shown below is used for coordinating multiple objects to move around without bumping into each other.
You may assume the pathfinder will give a straight path from one point to another.
The problem I am having is the orientation of the objects. The outcome of the code below make the objects swing left and right randomly.
My intention is the object must follow the "direction" of the pathfinder.
I should highlight this line
[code]
float angle = atan2(m_velocity.z, -m_velocity.x) + D3DX_PI * 0.5f;
[/code]

The output is out of expected.
What change(s) should I make in order to achieve the original intention?


[code]

#include "stdafx.h"
#include "CrowdEntity.h"
#include "Crowd.h"
#include "Pathfinder\Thread.h"

extern IDirect3DDevice9 *g_pDevice;
extern ID3DXEffect *g_pEffect;
HANDLE g_hMutex;

void CrowdEntity::PathFind(D3DXVECTOR3 s, D3DXVECTOR3 d, std::vector<D3DXVECTOR3>& p)
{
static HANDLE hEvent;
hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
g_hMutex = CreateMutex(NULL, FALSE, NULL);
D3DXVECTOR2 s1,d1;
s1 = D3DXVECTOR2(s.x, s.z);
d1 = D3DXVECTOR2(d.x, d.z);
PFThread thr(1, hEvent, s1, d1, 0.78, false);

thr.SetRunning(true);
thr.GetAStar()->SetClearance(5);
thr.run();
std::vector<D3DXVECTOR2> path;
path = thr.GetPath();

for (int i = path.size()-1; i > 0; i--)
{
D3DXVECTOR3 v;
v.x = path[i].x;
v.y = 0;
v.z = path[i].y;
p.push_back(v);
}

}

CrowdEntity::CrowdEntity(Crowd *pCrowd)
{


//if (cm_CBMesh == NULL)
//{
cm_CBMesh = new CMesh();
cm_CBMesh->Load("cb.dat");
//}

m_pCrowd = pCrowd;

m_position = GetRandomLocation();
m_goal = GetRandomLocation();



PathFind(m_position, m_goal, m_Path);

if (m_Path.size() > 0)
m_position = m_Path[0];


D3DXVec3Normalize(&m_velocity, &m_position);

m_count = 0;

// m_pAnimController = sm_OperatorMesh->GetAnimController();

/// ID3DXAnimationSet *anim = NULL;
// m_pAnimController->GetAnimationSet(0, &anim);
// m_pAnimController->SetTrackAnimationSet(0, anim);
// anim->Release();
}

CrowdEntity::~CrowdEntity()
{
if (m_pAnimController != NULL)
m_pAnimController->Release();
}

void CrowdEntity::Update(float deltaTime)
{
const float ENTITY_INFLUENCE_RADIUS = 100.0f;
const float NEIGHBOR_REPULSION = 50.0f;
const float ENTITY_SPEED = 200.0f;
const float ENTITY_SIZE = 100.0f;


//Force towards goal


if (m_count < m_Path.size())
{
// m_position derived from getRandomPosition();
// now is dependent on m_Path[m_count];
m_position = m_Path[m_count];
D3DXVECTOR3 forceToGoal = m_goal - m_position;

//Has goal been reached?
if(D3DXVec3Length(&forceToGoal) < ENTITY_INFLUENCE_RADIUS)
{
//Pick a new random goal
m_goal = GetRandomLocation();
PathFind(m_position, m_goal, m_Path);
m_count = 0;
m_position = m_Path[0];
}
D3DXVec3Normalize(&forceToGoal, &forceToGoal);

//Get neighbors
vector<CrowdEntity*> neighbors;
m_pCrowd->GetNeighbors(this, ENTITY_INFLUENCE_RADIUS, neighbors);

//Avoid bumping into close neighbors
D3DXVECTOR3 forceAvoidNeighbors(0.0f, 0.0f, 0.0f);
for(int i=0; i<(int)neighbors.size(); i++)
{
D3DXVECTOR3 toNeighbor = neighbors[i]->m_position - m_position;
float distToNeighbor = D3DXVec3Length(&toNeighbor);

toNeighbor.y = 0.0f;
float force = 1.0f - (distToNeighbor / ENTITY_INFLUENCE_RADIUS);
forceAvoidNeighbors += -toNeighbor * NEIGHBOR_REPULSION * force;

//Force move intersecting entities
if(distToNeighbor < ENTITY_SIZE)
{
D3DXVECTOR3 center = (m_position + neighbors[i]->m_position) * 0.5f;
D3DXVECTOR3 dir = center - m_position;
D3DXVec3Normalize(&dir, &dir);

//Force move both entities
m_position = center - dir * ENTITY_SIZE * 0.5f;
neighbors[i]->m_position = center + dir * ENTITY_SIZE * 0.5f;
}
}

//Sum up forces
D3DXVECTOR3 acc = forceToGoal + forceAvoidNeighbors;
D3DXVec3Normalize(&acc, &acc);

//Update velocity & position
m_velocity += acc * deltaTime;
D3DXVec3Normalize(&m_velocity, &m_velocity);
m_position += m_velocity * ENTITY_SPEED * deltaTime;
m_count++;
}
//Update animation
// m_pAnimController->AdvanceTime(deltaTime, NULL);
}

void CrowdEntity::Render()
{
D3DXMATRIX world, pos, rot;

//Position
//D3DXMatrixTranslation(&pos, m_position.x, m_position.y, m_position.z);

D3DXMatrixTransformation(&pos, NULL, NULL, &D3DXVECTOR3(0.5,0.5,0.5), NULL, NULL, &m_position);

//Orientation
float angle = atan2(m_velocity.z, -m_velocity.x) + D3DX_PI * 0.5f;

D3DXMatrixRotationY(&rot, angle);

//Set pose and render
world = rot * pos;

g_pDevice->SetTransform(D3DTS_WORLD, &world);
cm_CBMesh->Render();

}

D3DXVECTOR3 CrowdEntity::GetRandomLocation()
{
return D3DXVECTOR3(((rand()%1000 / 10.0f)) * 20.0f - 10.0f,
0.0f,
((rand()%1000 / 10.0f)) * 20.0f - 10.0f);// /1000.0f
}
[/code]
0

Share this post


Link to post
Share on other sites
Look at your World Transforms. If you want the objects to face a spacific object you'll need to handle that by setting up a new "LookatLH" Matrix to replace your current roataion transforms.
1

Share this post


Link to post
Share on other sites
DJTN, thank you for your response...
Actually, I don't need the NPC to face the player. I just want it to face the direction it's moving in.
I am just a bit slow at this. Why do we get an angle from this calculation?
[code]
atan2f(m_velocity.z, -m_velocity.x) + D3DX_PI * 0.5f
[/code]
because I was copying this code from a book....
Are there any illustrations for this kind of angle-to-tangent relationship stuff?
Another problem being is the objects are constantly spinning about the y-axis

BTW: Anyways that I can post animated gif to this forum?
[url="http://imageshack.us/photo/my-images/856/capture1s.gif/"] [/url]
Thanks
Jack
0

Share this post


Link to post
Share on other sites
The tangent function computes the length ratio of the opposite to the adjacent in a right-angled triangle, based on the angle between the 2 said legs (see e.g. [url="http://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine.2C_and_tangent"]this wikipedia article[/url]). The arc tangent (or atan for short) is the inverse function to the tangent: It gives you the angle between the 2 legs of a right-angled triangle where the lengths are known.

Because the argument to atan is a ratio, e.g. a/b, you have to ensure that b isn't null (division by zero) and you loose information (i.e. a/b is the same as -a/-b, and -a/b is the same as a/-b). That restricts the usability of atan. Hence atan2 was invented (see e.g. [url="http://en.wikipedia.org/wiki/Atan2"]this wikipedia article[/url]), which is in fact a "macro function" that is able to deal with b == 0 and the signs, just because a and b are given separately.

So, atan2 gives you an angle, and you add an angle (D3DX_PI) weighted by half. In summary you have an angle.
1

Share this post


Link to post
Share on other sites
So atan2f is the inverse of tangent. When I do a D3DXMatrixRotationY(m_velocity.z, -m_velocity.x), I look down from the top and calculate the angle between z and negative x.
Okay, I can understand this.
However, I am still clueless about why the statement D3DXMatrixRotationY(...) makes the objects spin non-stop
When I don't add this statement m_position = m_Path[m_count]; The orientation is correct. In effect, when there is no pathfinder.
Could you please check my code in the 1st post? I just couldn't contact the author of the book.
http://m.UploadEdit.com/b96/75626232.gif
Thanks
Jack
0

Share this post


Link to post
Share on other sites
For example, if the velocity vector has magnitude z => -0.1 x=>0.1
tan-1(-0.1/0.1) = -0.7615
So the angle is -0.7615 * 180 / PI => -43 degrees
which is correct.
How come the objects in the scene are spinning. pretty hairy?

[code]
ori: 265.330902 degrees
ori: 264.489746 degrees
ori: 263.595551 degrees
ori: 263.595551 degrees
ori: 262.760132 degrees
ori: 262.760132 degrees
ori: 261.872437 degrees
ori: 260.988373 degrees
ori: 260.988373 degrees
ori: 260.162933 degrees
ori: 259.286499 degrees
ori: 259.286499 degrees
ori: 258.468475 degrees
ori: 257.600311 degrees
ori: 257.600311 degrees
ori: 256.736694 degrees
ori: 256.736694 degrees
ori: 255.931183 degrees
ori: 255.076813 degrees
ori: 255.076813 degrees
ori: 254.280273 degrees
ori: 253.435776 degrees
ori: 253.435776 degrees
ori: 252.596603 degrees
ori: 252.596603 degrees
ori: 251.814682 degrees
ori: 250.986252 degrees
ori: 250.986252 degrees
ori: 250.214569 degrees
ori: 249.397324 degrees
ori: 249.397324 degrees
ori: 248.586029 degrees
ori: 247.830795 degrees
ori: 247.830795 degrees
ori: 247.031387 degrees
ori: 247.031387 degrees
ori: 246.287445 degrees
ori: 245.500290 degrees
ori: 245.500290 degrees
ori: 244.719635 degrees
ori: 243.993576 degrees
ori: 243.993576 degrees
ori: 243.225693 degrees
ori: 243.225693 degrees
ori: 242.511719 degrees
ori: 241.756958 degrees
ori: 241.756958 degrees
ori: 241.009064 degrees
ori: 240.313965 degrees
ori: 240.313965 degrees
ori: 239.579498 degrees
ori: 239.579498 degrees
ori: 238.897125 degrees
ori: 238.176331 degrees
ori: 238.176331 degrees
ori: 237.462646 degrees
ori: 236.799835 degrees
ori: 236.799835 degrees
ori: 236.100037 degrees
ori: 236.100037 degrees
ori: 235.450302 degrees
ori: 234.764496 degrees
ori: 234.764496 degrees
ori: 234.085938 degrees
ori: 233.456192 degrees
ori: 233.456192 degrees
ori: 232.791733 degrees
ori: 232.175201 degrees
ori: 232.175201 degrees
ori: 231.524872 degrees
ori: 231.524872 degrees
ori: 230.881851 degrees
[/code]
The orientation seems to be changing all the time

Thanks
0

Share this post


Link to post
Share on other sites
Although don't knowing the book, I would say there are some strange issues within the OP's code snippet. Maybe I'm wrong, but ...

1. Is PFThread really a concurrently running piece of program? IMHO such stuff is difficult enough to be used by experienced programmers only. BTW, what purpose has the mutex? It seems not to be used.

2. What is the path good for? It is computed every time a new goal is picked, i.e. it lasts for some time. In CrowdEntity::Update the current position is picked as a pre-computed sample on the path in this line
[code]
m_position = m_Path[m_count];
[/code]
and later the path index is incremented in this line
[code]
m_count++;
[/code]
without altering the path in-between. That means that each iteration through the update function will pick a pre-computed position, doesn't it?

But in-between those lines, the real position is computed from the picked position plus an offset towards the goal (notice: [i]towards the goal and not towards the next path segment[/i]) plus an offset computed to eventually avoid other objects.

So, IMHO, the position of the object at the end of frame n-1 (i.e. when the object is rendered) and the position of the same object at the beginning of frame n (i.e. when its next position is computed due to movement) are [i]not[/i] the same! That means that the object are jumping a bit from frame to frame.

Because the orientation depends on the movement, but the movement is not exactly related to position changes (see above), the orientation may not look at expected. Moreover, because the movement is computed towards the goal and considering the obstacle avoidance, you won't see it point along the path anyway.


I would try to simplify things. E.g. restrict the world to a single objects, comment out the obstacle avoidance stuff, print out the path and step through the code using a debugger. During that, check whether the computation of the position and later the orientation matches the expectations.
0

Share this post


Link to post
Share on other sites
[quote name='lucky6969b' timestamp='1312021360' post='4842472']
[code]
ori: 265.330902 degrees
ori: 264.489746 degrees
ori: 263.595551 degrees
ori: 263.595551 degrees
ori: 262.760132 degrees
ori: 262.760132 degrees
...
[/code]
The orientation seems to be changing all the time
[/quote]
Yes, but it changes gradually only. And there is no hint at the rate of change given here. And at least we don't know the path. Assume that the path is not straight but a curve, so something like the shown angles are to be expected. And last but not least, we don't know something about obstacles in the world.
0

Share this post


Link to post
Share on other sites
Hi,
According to your advices, I modified my coding a bit. This time, I compared 2 samples in the path to calculate the direction. the object is very unstable (swaying) although the direction looks fine
[code]
void CrowdEntity::Update(float deltaTime)
{
const float ENTITY_INFLUENCE_RADIUS = 100.0f;
const float NEIGHBOR_REPULSION = 50.0f;
const float ENTITY_SPEED = 200.0f;
const float ENTITY_SIZE = 100.0f;


//Force towards goal


if (m_count < m_Path.size()-2)
{
// m_position derived from getRandomPosition();
// now is dependent on m_Path[m_count];
m_position = m_Path[m_count];
//D3DXVECTOR3 pos1 = m_Path[m_count];
D3DXVECTOR3 posInc = m_Path[m_count+1];
D3DXVECTOR3 forceToGoal = posInc - m_position;



//Has goal been reached?
if(D3DXVec3Length(&forceToGoal) < ENTITY_INFLUENCE_RADIUS)
{
//Pick a new random goal
m_goal = GetRandomLocation();
PathFind(m_position, m_goal, m_Path);
m_count = 0;
m_position = m_Path[0];
}
D3DXVec3Normalize(&forceToGoal, &forceToGoal);

//Get neighbors
vector<CrowdEntity*> neighbors;
m_pCrowd->GetNeighbors(this, ENTITY_INFLUENCE_RADIUS, neighbors);

//Avoid bumping into close neighbors
D3DXVECTOR3 forceAvoidNeighbors(0.0f, 0.0f, 0.0f);
for(int i=0; i<(int)neighbors.size(); i++)
{
D3DXVECTOR3 toNeighbor = neighbors[i]->m_position - m_position;
float distToNeighbor = D3DXVec3Length(&toNeighbor);

toNeighbor.y = 0.0f;
float force = 1.0f - (distToNeighbor / ENTITY_INFLUENCE_RADIUS);
forceAvoidNeighbors += -toNeighbor * NEIGHBOR_REPULSION * force;

//Force move intersecting entities
if(distToNeighbor < ENTITY_SIZE)
{
D3DXVECTOR3 center = (m_position + neighbors[i]->m_position) * 0.5f;
D3DXVECTOR3 dir = center - m_position;
D3DXVec3Normalize(&dir, &dir);

//Force move both entities
m_position = center - dir * ENTITY_SIZE * 0.5f;
neighbors[i]->m_position = center + dir * ENTITY_SIZE * 0.5f;
}
}

//Sum up forces
D3DXVECTOR3 acc = forceToGoal + forceAvoidNeighbors;
D3DXVec3Normalize(&acc, &acc);

//Update velocity & position
m_velocity += acc * deltaTime;
D3DXVec3Normalize(&m_velocity, &m_velocity);
m_position += m_velocity * ENTITY_SPEED * deltaTime;
m_count++;
}

}

[/code]
Do I still miss something?
[url="http://m.UploadEdit.com/b96/5397764.gif"]http://m.UploadEdit....b96/5397764.gif[/url]
Another variation..
http://m.UploadEdit.com/b96/27894784.gif
Thanks
Jack
0

Share this post


Link to post
Share on other sites
[quote name='lucky6969b' timestamp='1312028121' post='4842503']
Hi,
According to your advices, I modified my coding a bit. This time, I compared 2 samples in the path to calculate the direction. the object is very unstable (swaying) although the direction looks fine
...
Do I still miss something?
[/quote]
Yes: You still mix up a path and the actual movement. IMHO the entire stuff dealing with the path is not only not necessary but harmful. Why do you pre-compute a path and then try to drive the object physically?
0

Share this post


Link to post
Share on other sites
But you understand what problem I see within that approach? Maybe I'm missing something, but until now I'm quite sure.

What happens if you try something like the following:
[code]
void CrowdEntity::Update(float deltaTime)
{
const float ENTITY_INFLUENCE_RADIUS = 100.0f;
const float NEIGHBOR_REPULSION = 50.0f;
const float ENTITY_SPEED = 200.0f;
const float ENTITY_SIZE = 100.0f;

D3DXVECTOR3 forceToGoal = m_goal - m_position;

//Has goal been reached?
if(D3DXVec3Length(&forceToGoal) < ENTITY_INFLUENCE_RADIUS)
{
//Pick a new random goal
m_goal = GetRandomLocation();
forceToGoal = m_goal - m_position;
}
D3DXVec3Normalize(&forceToGoal, &forceToGoal);

//Get neighbors
vector<CrowdEntity*> neighbors;
m_pCrowd->GetNeighbors(this, ENTITY_INFLUENCE_RADIUS, neighbors);

//Avoid bumping into close neighbors
D3DXVECTOR3 forceAvoidNeighbors(0.0f, 0.0f, 0.0f);
for(int i=0; i<(int)neighbors.size(); i++)
{
D3DXVECTOR3 toNeighbor = neighbors[i]->m_position - m_position;
float distToNeighbor = D3DXVec3Length(&toNeighbor);

toNeighbor.y = 0.0f;
float force = 1.0f - (distToNeighbor / ENTITY_INFLUENCE_RADIUS);
forceAvoidNeighbors += -toNeighbor * NEIGHBOR_REPULSION * force;

//Force move intersecting entities
if(distToNeighbor < ENTITY_SIZE)
{
D3DXVECTOR3 center = (m_position + neighbors[i]->m_position) * 0.5f;
D3DXVECTOR3 dir = center - m_position;
D3DXVec3Normalize(&dir, &dir);

//Force move both entities
m_position = center - dir * ENTITY_SIZE * 0.5f;
neighbors[i]->m_position = center + dir * ENTITY_SIZE * 0.5f;
}
}

//Sum up forces
D3DXVECTOR3 acc = forceToGoal + forceAvoidNeighbors;
D3DXVec3Normalize(&acc, &acc);

//Update velocity & position
m_velocity += acc * deltaTime;
D3DXVec3Normalize(&m_velocity, &m_velocity);
m_position += m_velocity * ENTITY_SPEED * deltaTime;
}
[/code]

Please tell us the sense of PathFind(). What is it computing, and what is the purpose of the resulting path?


EDIT: direction of forceToGoal negated, and re-computation of that value on new goal inserted. Edited by haegarr
0

Share this post


Link to post
Share on other sites
Wow, yeah. This is the original program... :)
The pathfind() function just computes a straight path with no obstacles for the time being.
I need a pre-computed path because I don't want the objects to wander freely....
Do you want me to send the whole stuff to you to have a look at it? It's very small
Thanks
Jack
0

Share this post


Link to post
Share on other sites
[quote name='lucky6969b' timestamp='1312033289' post='4842517']
Wow, yeah. This is the original program... :)
[/quote]
Ohh. Okay. So you already knew that version ;) However, does it show the same problem? Probably not, so the problem is really in the mix-up as said!?

[quote name='lucky6969b' timestamp='1312033289' post='4842517']
The pathfind() function just computes a straight path with no obstacles for the time being.
I need a pre-computed path because I don't want the objects to wander freely....
[/quote]
Well, they never wander freely because they wander towards a goal. Do you want them to reach the goal not on a straight line (when ignoring the avoidances here) but more-or-less along a path prescription? So you can give them a curved way, for example? Is that the intention?

[quote name='lucky6969b' timestamp='1312033289' post='4842517']
Do you want me to send the whole stuff to you to have a look at it? It's very small
[/quote]
Not for the moment, because I still haven't understood the whys and whats, and I probably won't see this in the code.
0

Share this post


Link to post
Share on other sites
Can the objects dodge static obstacles with this coding? I don't need a pathfinder?
But i need a precise path. because it's a computational project...
The path comprises of straight and curved portions
Thanks
Jack
0

Share this post


Link to post
Share on other sites
[quote name='lucky6969b' timestamp='1312034006' post='4842524']
Can the objects dodge static obstacles with this coding? I don't need a pathfinder?
[/quote]
The objects can avoid dynamic obstacles (just the other moving objects) and hence I'd say, yes, they can avoid static obstacles, too. Maybe it requires some tweaking though.

The implemented method is this: The object tries to go step straight into the direction of the goal. But there is an obstacle in the way. If the obstacle is far enough then the objects does the step as-is. If it is too close then the object gets a pulse into a direction to avoid a collision.

[quote name='lucky6969b' timestamp='1312034006' post='4842524']
But i need a precise path. because it's a computational project...
The path comprises of straight and curved portions
[/quote]
If the paths of all moving objects are pre-defined, then don't use dynamic avoidance and physical motion. Use a timeline animation instead, so you'll have all under control. Run the animation until you see a collision, then tweak the animation curves as needed.
0

Share this post


Link to post
Share on other sites
Excuse me for my dumbness. But what is a timeline animation specifically? And also, Are there any good web references for me to take a look at up to this point? And of course, source code Thanks Jack
0

Share this post


Link to post
Share on other sites
With timeline animation I mean that the placements of all objects are pre-defined, manually tweaked, driven by a timeline.

Should the environment be dynamic? Should the situation be evaluated each frame, and the movement adapted accordingly? I.e. the movement is computed on-the-fly? Hence the path will look zigzag like but smoothed because sudden changes in velocity cannot occur. Then there is no sense in computing a path in advance. An addition may be that the path an agent can choose is constraint by the environment.

Or else ... Should the path be computed in advance? So that it is defined, all situations in the environment predetermined? No surprising encounters? Then a hand tweaked timeline animation can be used, yielding in a totally deliberate movement.

Your OP contains a mix of both. It is just that mix that makes your code snippet not work. Hence my question: What is the goal? Why do you think you need both approaches together?
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0