|
Hi, The problem is when I am strafing the character left or right and I instantiate a projectile, the projectile is instantiated 'late' and does not remain in front of the player. Is there a way to update the position somehow? I know that the multiplication assignment operation "*=" can be applied to rotations, but it cannot be applied to a transform.position, it seems like I would use something like that?
(comments are locked)
|
|
if you do the instantiation and character movement / rotation in the same event (update or fixedupdate) then there should be no problem but yes if you do one of them in physics frames (i.e FixedUpdate) and another one in normal frame (i.e Update) then it could happen! if you use the same event for both so if your code is correct, first you check the input for rot/movement and do that and then do the Instantiation everything will be ok. I am statically communicating with two scripts to make the instantiations..From what you are telling me, that is the problem?
Apr 26 '11 at 01:58 AM
lampshade
(comments are locked)
|

posting your code or at least a better description of it's structure could help others to answer your question easily!
Could you explain to me again if this is possible with the code above (edited)?