I've been working on a First Person Shooter type map lately and I can't find a way around this problem.
I set the turning rate to 0 for the main character so that he faces forward whilst he strafes,but if I turn the camera whilst moving my character refuses to face the new camera angle. The unit is using the move command to move, I'm not moving him instantly because that makes the camera movement become choppy and without instantly moving him large distances at a time he is rather slow.
I've tried everything I could think of: actor messages, make unit face angle, etc..
Also it doesn't matter if its the Actor of the unit facing the angle or the unit itself, any help you can give me is appreciated :)
I recommend giving the unit his turning speed back and then going with the Move Unit (Instantly) function. I use this method in my map Xeno Crisis (page in the sig) to allow space ships to pivot while moving. Try looping the Move Unit function, shifting the unit's position slightly with each loop execution. For this situation, moving the unit to the unit's own position with a polar offset would likely produce the best results. If the camera is still too choppy, disable the camera lock and pan to the unit instead. You can always lock to the unit again once the strafe maneuver is finished.
Here is the action definition I use, for your reference:
ShipMomentumOptions:Action,CreateThreadReturnType:(None)ParametersUnit=NoUnit<Unit>GrammarText:ShipMomentum(Unit)HintText:(None)CustomScriptCodeLocalVariablesActions------- Custom Value 11 = Ship momentum------- Custom Value 12 = Momentum direction in degrees (0 to 360)General-While(Conditions)aretrue,do(Actions)Conditions(Unitisalive)==TrueActions------- MOMENTUMGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Customvalue11ofUnit)>0.1ThenGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(UnithasTimeScale10)==TrueThenUnit-MoveUnitinstantlyto((PositionofUnit)offsetby((Customvalue11ofUnit)/100.0)towards(Customvalue12ofUnit)degrees)(Blend)ElseUnit-MoveUnitinstantlyto((PositionofUnit)offsetby((Customvalue11ofUnit)/10.0)towards(Customvalue12ofUnit)degrees)(Blend)ElseGeneral-Wait0.1GameTimeseconds
Try leaving the turn speed at a normal number you want while moving, and applying a strafing buff with modification flag suppress turning while strafing under behavior tab.
I've been working on a First Person Shooter type map lately and I can't find a way around this problem. I set the turning rate to 0 for the main character so that he faces forward whilst he strafes,but if I turn the camera whilst moving my character refuses to face the new camera angle. The unit is using the move command to move, I'm not moving him instantly because that makes the camera movement become choppy and without instantly moving him large distances at a time he is rather slow.
I've tried everything I could think of: actor messages, make unit face angle, etc..
Also it doesn't matter if its the Actor of the unit facing the angle or the unit itself, any help you can give me is appreciated :)
@OneDumbGuy158: Go
I recommend giving the unit his turning speed back and then going with the Move Unit (Instantly) function. I use this method in my map Xeno Crisis (page in the sig) to allow space ships to pivot while moving. Try looping the Move Unit function, shifting the unit's position slightly with each loop execution. For this situation, moving the unit to the unit's own position with a polar offset would likely produce the best results. If the camera is still too choppy, disable the camera lock and pan to the unit instead. You can always lock to the unit again once the strafe maneuver is finished.
Here is the action definition I use, for your reference:
Try leaving the turn speed at a normal number you want while moving, and applying a strafing buff with modification flag suppress turning while strafing under behavior tab.
@BasharTeg: Go
Helps a lot, thanks!
@OneDumbGuy158: Go
No problem :)