joniveehernandez Posted July 2, 2014 Share Posted July 2, 2014 Hi guys, need your help here, I'm trying to create a car wheel using target omega. For example below, the left object rotates properly using target omega. But when I rotate the object direction (like a car wheel when turning) the target omega does not follow. Note that the wheels are child prims. Since I cannot make the parent prim spin because of its main purpose. Any ideas or technique that I can use. Link to comment Share on other sites More sharing options...
Freya Mokusei Posted July 2, 2014 Share Posted July 2, 2014 I can't speak for TargetOmega as I've not tried using it in that scenario, but consider this:- The cylinders don't actually need to 'turn' in order to create the spinning - you can spin the texture on the wheels. Using a TextureAnimation instead of TargetOmega for wheel spin would enable you to avoid this problem entirely. This has the advantage of not requiring any additional vertex math to render, and both effects are client-side. Just a thought. Link to comment Share on other sites More sharing options...
joniveehernandez Posted July 2, 2014 Author Share Posted July 2, 2014 Yes animating texture is much more better since I saw some examples of it. But is it possible to animate it if the wheel is only 1 object where the Rim and the wheel (exterior) is only 1 texture? or is it necessary to separate them into 2 objects? Example: Link to comment Share on other sites More sharing options...
Freya Mokusei Posted July 2, 2014 Share Posted July 2, 2014 Wheel exterior as in, tire tread is a composite texture with tire front? LIke the side and front face of the cylinder are the same texture? This might be possible depending on the texture - you'd need a PAN type animation rather than rotate on the tire tread (cylinder side). If you're asking only about the single outer face... I don't understand why it'd be necessary to split them. Link to comment Share on other sites More sharing options...
joniveehernandez Posted July 2, 2014 Author Share Posted July 2, 2014 My tire is only 1 object = rim + exterior. It means the graphics of the rim and exterior are in 1 texture. Can you give me a sample script of yours? Link to comment Share on other sites More sharing options...
Freya Mokusei Posted July 2, 2014 Share Posted July 2, 2014 Can't provide sample scripts, sorry. I get that the tire is one object, but are you saying both the long side of the cylinder (yellow in your image) is part of the same texture as the front of the cylinder (blue in your image)? Link to comment Share on other sites More sharing options...
joniveehernandez Posted July 2, 2014 Author Share Posted July 2, 2014 Yes part of the same texture, since I'm done working with the wheels capability to spin according to user control if its moving forward and backward and also the spinrate of the wheels depends on the velocity of the vehicle. The only one problem left here is the turning front wheels when the vehicle rotates to left or right. I want to achieve this to make it more realistic vehicle experience Link to comment Share on other sites More sharing options...
Freya Mokusei Posted July 2, 2014 Share Posted July 2, 2014 Can do this provided your texture is laid out something like below:- Side would only need a directional animation (always moving left for example) Top can still spin as it's still located in the center of the texture. Remember you'll need some use of Pi to make sure the Side spins at the same rate as the Top. Link to comment Share on other sites More sharing options...
arton Rotaru Posted July 2, 2014 Share Posted July 2, 2014 Texture animation is nice, I did it on my vehicles as well. However it obviously only works on wheels without spokes. If you have a rim with spokes like in the image, you are out of luck, and have to stop and restart targetomega whenever the wheel turns. Looks ugly, and still a little wonky, I know, but SL is lacking proper tools for something simple like car front wheels. Link to comment Share on other sites More sharing options...
Innula Zenovka Posted July 2, 2014 Share Posted July 2, 2014 The formula to rotate the prim using its own frame of reference is something on the lines of llTargetOmega(<0.0,0.0,-1.0>*llGetLocalRot(),1.0, 0.1); However, since llTargetOmega is played locally on your machine, you may well need to think of how to update it when your whole object changes direction (otherwise, your gpu and cpu don't realise anything's changed). There are various ways to deal with the problem but I'd need to know a bit more about what you're making to give you sensible advice. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now