Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

None-Physical random movement into the direction the prim is facing.

Dalea Kojima
Registered User
Join date: 31 Mar 2004
Posts: 27
06-22-2006 06:02
Hi!

I am creating a little bot that moves towards where it looks and turns randomly during movement (so that it changes its course).
It works great with physical prims since I can use an applied impulse for its movement.

But I need a script that works with flexi prims and those can't be physical.

I think the only way it would work is with a formula that takes into account the prims rotation and the current position, but that would be quite complicated.

Is there a way to tell a none physical prim to move a certain distance into the direction it is 'facing'?


Thanks,


Dalea
Aodhan McDunnough
Gearhead
Join date: 29 Mar 2006
Posts: 1,518
06-22-2006 06:23
Yes

llSetPos(<distance,0,0> * llGetRot() + llGetPos());

This assumes that +x is where your bot is facing.