HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Problems with using the LookAt function on a looping timer.

08-13-2006, 07:52 PM#1
Lordy
Hi. I'm using a custom missile function. So, a function for moving a unit through the air just like a normal blizzard missile. Now ofcourse the missile shouldn't always look straight forward- when it goes down, it has to look down. I'm using the LookAt function to change where the missile points(looks) at. I use it (the lookat function) in a timer callback function. The timer expires every 0.02 seconds. So every 0.02 seconds I call the LookAt function. Now the problem is that the missile on which I use this lookat function just doesn't get effected by it. It keep looking straight forward. Now I know this has to do with that I repeat the LookAt function so often (every 0.02 sec), but I don't know how else I should use it then. Tnx for help.
08-13-2006, 08:34 PM#2
Captain Griffen
Suggest you use a dummy model like the one in the caster system to get angles for projectiles (lots of animations for each angle).
08-13-2006, 09:44 PM#3
Vexorian
Quote:
Being against ALL BJ is like being against ALL code written by other people.

But we are against the dummy BJ functions that just swap the arguments or just call the natives, also against those bj functions that have memory leaks
08-13-2006, 10:38 PM#4
The)TideHunter(
Yep.
I have to admit, some BJs can come extremly handy sometimes, to polish your code, such as "OrderId2StringBJ".
But i myself am against the worthless, useless, slowing, memory leaking, indirect BJ's
08-14-2006, 12:23 AM#5
PipeDream
Make sure you're using bone_head or bone_chest, lookat works with nothing else. It also, from what I understand, jitters if you call it multiply. So call it once and move the target around to tilt.
08-14-2006, 08:43 AM#6
Lordy
Quote:
Originally Posted by Captain Griffen
Suggest you use a dummy model like the one in the caster system to get angles for projectiles (lots of animations for each angle).

Em. I am usign that model- but I it doesn't display any animations when I look at it in the WE...?

Also through SetAnimationById I can't get it to change it's angle... uhm.. :S.
08-14-2006, 11:26 AM#7
Captain Griffen
Why would it display any animations? It has no mesh, or anything! It is just an attachment point with animations for various angles!