Turn Object Bounciness Attribute On & Off with Change Attribute Not Working Right???
KillerPenguinStudios
Member Posts: 1,291
Hello All,
So in my project I have an object that I changed it's Bounciness to zero. I also have another object that I also changed it's Bounciness to zero.
In object one I am saying:
-When object one self.Position.Y > 208
-Change Attribute self.Physics.Bounciness to 1
I also told object one to display self.Physics.Bounciness so I know it is changing from 0 to 1when told to but the issue is is the object is not bouncy even though it says it's self.Physics.Bounciness is 1.
Is there something else I need to do to get it to work properly? Thank you in advance for taking the time to help.
Thanks,
Killer Penguin Studios
Comments
I'm pretty sure you can't change 'Bounciness' at runtime.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Yeah, can't be changed during run time. Would be nice though, maybe put in a feature request to manipulate physics in real time.
Follow us: Twitter - Website
Try creating two actors one with bounciness set to 1 and the other to 0 and use spawn and destroy or shift them on and off the screen. You should be able to get this or something similar to work.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
Like the others have said, you can't change bounciness at runtime . . . you could make two identical actors one with bounciness set to 0 (object 1) the other with bounciness set to 1 (object 2) and swap them over when you need to.
i.e. . . .
When object one self.Position.Y > 208
Spawn object two.
Destroy.
Thank you @jamie_c, @AlchimiaStudios, @colander, & @Socks.
Thank you for your quick responses. That stinks that you can't change at run time. I just created a second object of the same and made its Bounciness 1 and placed it in the scene pretty much in the same exact spot as the first object but just off a couple pixels and is working great, for now. LOL
Thanks again guys!