- Home /
weapon bobbing
HI GUYS
I saw a few videos about some games where the child object doesn't move exactly at the same time as it's Main Object. So there's kind of delay or time-shift. I tried this with animations and a few other things... but is there a code on how to delay the child objects... Here are some games or videos:
http://www.youtube.com/watch?v=byav2QpYdEk http://www.youtube.com/watch?v=Akr-KEJRN3c
The question is unintelligible. What exactly in the videos you are interested in?
The question makes sense, but the videos seem unrelated. In answer: just don't child them then but make them follow the parent with a delay. Child means the parent transform directly influences the child's transform.
Can you include the $$anonymous$$utes/seconds where the effect happens in the video. How do you even know the objects are parent/child?
well I don't really know if the weapons are child objects but I think so because in many fps games it's like this. By the way this effect happens almost every time when the guy who is playing moves the mouse. You can see this at the avert fate video very good. The weapon has a bit of rotation. And how does this delay function like Joshua said work? Thx for the comments
That's not a delay. You talk about the weapon-bobbing. You have to use either an animation and animate it the way you want it or write a script that moves the weapon this way if you walk.
You could have mentioned that you talk about the weapon.
Ask specific questions !
Answer by bubblegumsoldier · May 28, 2011 at 11:06 AM
so how can I do weapon bobbing.
You did a nono henry as this is not an answer to your question. :) I'd do bobbing with additive animations to go easy on the CPU.
so how do you mean that and sorry for the answer I just wanted that somebody sees this at the questions. What are additive animations? and where and how can I put this in the code... how do the animations have to look like?
The additive is to be able to transform back to an idle animation anywhere in your current animation. The animations would be easier to create in a 3d-modelling program such as 3d Studio, $$anonymous$$aya, Blender or Cinema 4D. I suggest you take a look in the reference: http://unity3d.com/support/documentation/$$anonymous$$anual/Animation%20Scripting.html
I could maybe give u my look round script and then you could add the right codes to the right place in the script and tell me which animations I need...
here's the code in an url:
Your answer
Follow this Question
Related Questions
Cycle Textures Over Time 2 Answers
Delaying a dynamic Variable(transform.position for Ex.) 2 Answers
Have a delay after each jump, so user cant spam jump 3 Answers
Touch Lag With S2 1 Answer
Do something every 0.5 seconds 3 Answers