Eye node does not move

Scripting questions, discussions, etc
6 posts Page 1 of 1
noemen
Posts: 100
Joined: Tue May 29, 2018 3:46 pm
 
by noemen » Tue Dec 10, 2019 7:38 am
I'm having big problems when I put the iron sights (I made a simple script). The Eye node does not follow and the hand is outside the weapon (I am rendering the body in first person). I have tried to turn the Eye node into a different position when I use the iron sights, but I see no change.

It seems to me that EyeOffset only changes the weapon image in first person and I don't see camera movement (Eye).
Duion
Posts: 1603
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Tue Dec 10, 2019 9:59 pm
You encountered one of the reasons why most games do not use the actual third person model for first person.

Did you look into Uebergame how I solved it? I have working iron sights with third person model as first person as well. I have kind of an ugly solution, I just mount the gun to the eye node, only problem is the hand animation no longer fits, that is why most games do not use the actual body in first person and just attach the hands to the gun.

Whatever, why don't you just steal my working code?
noemen
Posts: 100
Joined: Tue May 29, 2018 3:46 pm
 
by noemen » Wed Dec 11, 2019 7:05 am
Your solution was clever, but visibly not cool. I always like everything perfect. I have a solution in ment ... Can the look animation be changed during the game? I mean, have two possible animations for the look?

For example ... create a function where if true, another animation will be the look ... got it?
Duion
Posts: 1603
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Wed Dec 11, 2019 11:41 am
Well I don't have a third person aim animation, that is missing, should be doable, but will be hard to align.

Or you do a separate first person gun model with the arms attached to it and remove the rest of the body like other games do, with this solution the animation will always line up perfectly, since the arms are glued to the gun.

You do not change the look animation, you change the aim animation. My solution is pretty cool since it works, much cooler than a not working solution. So don't complain, even most AAA games cannot solve this problem and their third and first person animations do not line up perfectly as well. So my solution is even cooler than theirs, since I have the real body in first person that accurately reflects the animations in first and in third person, well except the iron sight aim animation. I could have fixed it, but it turned out to be more complicated since the default engine code did not have something to put the iron sight aim state into a state machine and attach an animation for it.
noemen
Posts: 100
Joined: Tue May 29, 2018 3:46 pm
 
by noemen » Thu Dec 12, 2019 6:05 am
My solution would be to start the game in relaxed mode (with the gun downloaded, where in which the character is not in Look mode) and the character can only shoot (shoot and point the gun) if I press a button that activates the Look and Head animations. I see a lot of games using this, it could be an exit, where Look could be in iron crosshair mode.

I'm trying to make this work using TorqueScript.
But I can't find a way to start the doll in room mode and only get into Head and Look mode if it's called (when i press a button and if I press it again it would come out). Mount and Blade uses this strategy and other games. With that, to do a lot...
Duion
Posts: 1603
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Thu Dec 12, 2019 11:02 am
I would just use a cheap workaround for example make the weapon two different weapons, one weapon for holding the gun and looking, this weapon image cannot shoot and when you hold aim it switches to another weapon image that then can shoot, this is also how my iron sights work I think.

Otherwise try to implement it in the state machine, I think there even is a state like prefire or so that you can use that runs before you can fire, like a minigun that has to spin up first or so. The state machine is kind of tricky, you have to try all through until you find one that does what you need.
6 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests