≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
animation timings
Posted by:
(you are not logged in)
Enter the missing letter in: "Int?rnational"
(you are not logged in)
Text:
[quote][b]Robo[/b] wrote: I want to adjust the player animation speed according to player movement speed yet this doesnt not work smoothly in CC as changing animation speed using "FramesPerSecond" resets the current animation each time. To fix the above, I want to calculate accurate time of each full animation like walk etc...comes to 1076 ms at 300 FPS, but when I recalculate the time to complete each animation based of new frames per second amount, it no longer matches a complete animation but is over the place... My maths seems fine to me and works perfectly when at standard 300 FPS. Anything outside this dosnt work....I cant see why...any ideas ??? the on frame behavior code is below: // animation speed if (this.Time > this.animEnd && this.anim == "moving") { var animFrames = 300 * this.hillSpeed; ccbSetSceneNodeProperty(this.Player, "FramesPerSecond", animFrames); var animTime = 323000 / animFrames; // ie 323 animation frames @ 300 FPS = 1076 ms this.animEnd = this.Time + animTime + 16; // 16 ms is each on frame delay in the behavior. }[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact