Chelaru Posted April 21, 2016 Posted April 21, 2016 Hello,I want to make the head of the turret to rotate 360'. The maxHeading = 90; is not doing anything. void TurretShape::_setRotation(const Point3F& rot) { _updateNodes(rot); mShapeInstance->animate(); mRot = rot; } This is the function that should do something with the rotation. I think mShapeInstance->animate(); playes the animation. (The thing is that i loaded the models in blender and can't find the animation). My problem is that i don't understand how to make the turret head rotate 360'. Quote
Jason Campbell Posted April 27, 2016 Posted April 27, 2016 You are correct, that it is tied to the animation, which is contained in the legs. Wish I could help more. I can't get anything to work in Blender. The legs are missing some pieces. There is some animation imported though. Quote
flysouth Posted June 1, 2016 Posted June 1, 2016 My understanding is that it is not animated in Blender. The document says...Shape File Nodes The shape file used for the TurretShape needs to have a number of defined nodes. The first nodeis named ‘heading’. The heading node is special in that it is controlled by the TurretShape code. This means that itshould not be animated by the artist, nor should it have anything but the default transform applied to it. This doesn’tstop the heading node’s parent or its children from being animated, however.I am trying this too but have not managed to get it to move. This is the command: setTurretEulerRotation(...); Quote
Jason Campbell Posted June 1, 2016 Posted June 1, 2016 Perhaps your right, I merely based my response on a test I did using 3d Max, which is what the GG artists used, not Blender. It seems to me that the rotation is controlled by the animation of the node but perhaps there is a way to do it in pure code. The documentation also talks about turrets controlled by player. In my attempt I tried everything. I could mount and dismount, I could fire the gun but all attempts to have the turret move with player mouse control failed. I hope there is a way. Quote
Azaezel Posted June 1, 2016 Posted June 1, 2016 http://imgur.com/a/Xguu3 barebones setup. and yeah, engine side controls pitch and heading rotation values and constraints. not model-side. Quote
flysouth Posted June 2, 2016 Posted June 2, 2016 I have also tried everything. Even in the console window the setTurretEulerRotation command does nothing. The getTurretEulerRotation returns the turret position and if you do it after the set then it shows that the turret has moved but image still in same place. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.