Hey everyone, is there a way to activate physics with javascript? The work we do in hype requires a lot of javascript, and we use very little timeline.
I need a way of activating several dynamic physics bodies at a certain time.
Any ideas?
Thanks for your time.
DBear
November 10, 2015, 3:36pm
2
There is no API for the Physics in Hype. Unfortunately.
D
h_classen
(Hans-Gerd Claßen)
November 10, 2015, 3:52pm
3
you can activate physics as an elements property on a timeline -> this timelime can be controlled by javascript … that’s all …
Lud
April 13, 2021, 3:16pm
4
Hey @h_classen How would one go about doing that?
1 Like
Daniel
April 13, 2021, 3:20pm
5
Open up the 'mastering physics' document: https://tumult.com/hype/documentation/documents/PhysicsDemo/PhysicsMaster.hype.zip
Then jump to the 'programmatic physics' scene:
To control Timelines (which might have Physics property changes) you would use the Hype api: https://tumult.com/hype/documentation/#timeline-functions
1 Like
Lud
April 13, 2021, 3:20pm
6
Thanks so much @Daniel , I'll definitely be checking that out!
UPDATE: I checked it out and it works perfectly! Very easy to implement!
2 Likes