|
Iria Troell
Bunny of the House
Join date: 30 Jan 2007
Posts: 10
|
05-22-2007 17:19
I'm working on a script for what is essentially a large bullet. One of the functions im trying to work in is for the bullet to read the rot of what it hits and alter it's own to be piercing the target at exactly a 90 degree angle no matter what angle i fire from or what angle the object is at. I used llSetRot(llDetectedRot(0)); in the collision_start state to trigger this, but ive run into a rather large and obvious problem. If the object im hitting is not rotated to face up (i think it's up...), it totally throws off the effect and the "bullet" will end up facing down or up or backwards. This is my first step into playing with rots, so if you can offer insight, or suggest any commands to make life reading and manipulating them easier, it would be much appreciated.
|
|
AJ DaSilva
woz ere
Join date: 15 Jun 2005
Posts: 1,993
|
05-22-2007 19:49
Set the rotation of the bullet to the angle between the bullet's location and that of the object it's colliding with. Can't think of the code off the top of my head I'm afraid.
|