Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 20:05
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, kzhao, alibaba), 627 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Problem with modelpath #273802
06/24/09 13:23
06/24/09 13:23
Joined: Jul 2006
Posts: 511
Germany,NRW
KMS Offline OP
User
KMS  Offline OP
User

Joined: Jul 2006
Posts: 511
Germany,NRW
Hi @ all!

Since a long time ago I have a problem with a script.I don't use no longer the old ent_path,ent_waypoint etc.I would like that my entity does not start the path at the first node but at the 5th node.I'm not able to get it right,only,if I deaktivate the while,my entity gets set at the 5th node.Starting the while,the model starts at the first node.Can someone help me?


Hab seit langem mal wieder ein Scriptproblem.Und zwar benutze ich jetzt die "neuen" Pathbefehle und nicht mehr ent_waypoint etc.Ich möchte,daß die Entity nicht mit dem ersten Wegpunkt anfängt seinen Pfad abzulaufen,sondern mit dem 5ten.Kriegs nicht hin,wenn ich die whileschleife auskommentiere,wird die Entity korrekt auf den 5ten Wegpunkt gesetzt,startet die While,fängt der Kurs trotzdem bei 1 an.Hat jemand ne Idee?



function Roboterpfad_Aufzug()

{
var dist = 0;
var vLastPos[3];
var vDir[3];

path_set(me,"RobotAufzug");
path_getnode(my,5,my.x,0);

while(1)
{
path_spline(me,my.x,dist);
dist += 100*time_step;

vec_diff(vDir,my.x,vLastPos);
vec_to_angle(temp.pan,vDir);
my.pan=temp.pan+90;
vec_set(vLastPos,my.x);
wait(1);
}
}


You need full animated lowpoly-fishes?Look at
http://www.projekt-3d.de/pages/shop2pag.html
Re: Problem with modelpath [Re: KMS] #273980
06/25/09 08:16
06/25/09 08:16

M
mercuryus
Unregistered
mercuryus
Unregistered
M



path_spline beginnt mit der Berechnung der Kurve (bezier?) bei Knoten 1.
Einen alternativen Startknoten kann man (derzeit) nicht setzen.
Um "etwa" bei Knoten 5 zu starten:

die Summe der Distanzen zwischen den Knoten 1..5 berechnen und diese Distanz bei path_spline als Startwert setzen. (Allerdings ist die Position dann der genäherte Kurvenwert)

Du kannst aber die Bewegungskurve selbst berechnen:

http://www.id.uzh.ch/publications/ps/bezier.html
http://www.ullala.at/experiments/movement/bew_bez.html


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1