Mathematics, and axes that are offset, and scripting pivotti

Post » Sat May 28, 2011 7:52 am

I'm not normally one to discard maths but have you tried setting the beam up as a projectile (e.g. a laser), and flagging it as embedded and using the node Camera01 or Head or something? If it works...
E: Yeah, Bip01 Head works in 1st/3rd.


Somebody else out there might know different (I'm hoping they do), but as far as I know objects attached to the camera01 node will not render in 1st person, they have to be attached to an arm node. Also, anything that's a part of the player model seems to render separately from the rest of the game world. Ever notice how your gun never clips through walls? Its rendered separate and overlayed (the 1st person model even has its own field of view setting). That means that if implemented that way, the light beam might look ok from the player's perspective, but it wouldn't illuminate anything (kind of get the feeling I"m repeating myself...)
User avatar
Bad News Rogers
 
Posts: 3356
Joined: Fri Sep 08, 2006 8:37 am

Post » Sat May 28, 2011 4:33 pm

That's why you fire a projectile from an unrendered node. It /does/ render.
User avatar
Aliish Sheldonn
 
Posts: 3487
Joined: Fri Feb 16, 2007 3:19 am

Post » Sat May 28, 2011 3:36 am

When an object is rotated with setangle, it's rotated around the origin specified in Nifscope. So if you're trying to rotate something around an axis that's offset from its visual center, you can either do trig like you're attempting, or open up the object in nifscope and move its origin (or move its model away from the origin, actually.) Then you just rotate, no trig needed, and its easier on the processor. If you want it to rotate about several different radii, though, you'll need to create multiple versions of the model.



Thanks a lot, I didn't realize you could do that in nifskope, but I figured it out with a little experimenting, not difficult at all really. And it's working great.
User avatar
Astargoth Rockin' Design
 
Posts: 3450
Joined: Mon Apr 02, 2007 2:51 pm

Post » Sat May 28, 2011 10:31 am

That's why you fire a projectile from an unrendered node. It /does/ render.


Yup, realized I hadn't fully understood your post shortly after I wrote my response. Wonder how well an offset added to the projectile model in nifskope would work - the camera01 node points in the right direction, but it's located at about your adams apple.
User avatar
Rozlyn Robinson
 
Posts: 3528
Joined: Wed Jun 21, 2006 1:25 am

Post » Sat May 28, 2011 6:22 am

It's unfortunately not a useful node as it's pointing directly upwards, so if you fire a projectile out it just points towards the ceiling. Head is conveniently closer to the right place, facing forwards, and is present in the 1st and 3rd person skeletons in roughly the same position so you don't have to change the script depending on POV.

Pretty sure you can just add translation in NifSkope?
User avatar
aisha jamil
 
Posts: 3436
Joined: Sun Jul 02, 2006 11:54 am

Post » Sat May 28, 2011 5:20 pm

Pretty sure you can just add translation in NifSkope?


I would think. It might take some trial and error. I experimented with the Camera01 node, and, apart from it being at neck height in 3rd person, it fires in the right direction. What's funny is that it doesn't seem to take player scale into account - I have another mod that sets the player scale to about 5, and if I try to fire something from a head node it comes out of the, er, belly button.
User avatar
Eileen Müller
 
Posts: 3366
Joined: Fri Apr 13, 2007 9:06 am

Previous

Return to Fallout 3