About Monkey 2 › Forums › Monkey 2 Projects › Monkey2 blog posts: Behaviours
Tagged: 3d, behavior, behaviors, behaviour, behaviours, Component, components, force, impulse, island demo, IslandDemo, mojo3d, physics, torque
This topic contains 10 replies, has 5 voices, and was last updated by DruggedBunny 1 month ago.
-
AuthorPosts
-
December 9, 2018 at 10:51 pm #15678
Hi all, I decided to turn my latest demo into a blog post — my first since 2012!
Monkeying Around with mojo3d: arcade plane physics
It’s the first part in explaining how this simple demo works:
No idea who it’s aimed at — definitely not beginners! — but attempts to sum up some basics of working with physics in mojo3d.
I’ll (hopefully) follow it up with an explanation of the remaining aspects in the near future!
December 10, 2018 at 12:17 am #15679
Amon
ParticipantCool. Nicely formatted with very good explanations and information.
Thanks.
December 11, 2018 at 4:03 am #15680
DruggedBunny
ParticipantJust done a follow-up to try and explain how mojo3d Behaviours work, as well as how to apply forces/torques and impulses:
Monkeying Around with mojo3d: physics behaviours
December 11, 2018 at 7:15 am #15681
Ethernaut
ParticipantThat’s a great hands on intro to Mojo3D. Can we get it pinned, or linked to somewhere in the main website?
December 11, 2018 at 1:50 pm #15682
lucas200206
ParticipantI really like your style of writing. I was wanting to mess around with mojo3d for a while but this introduction definitely helped me to get set on the right path.
December 12, 2018 at 12:44 am #15684Nice to hear! I’ll try do a few more over the next few days/week anyway…
Thanks for the comments!
December 16, 2018 at 11:26 pm #15700Just added a new post:
Monkeying Around with mojo3d: wrapping physics behaviours
This one’s a little technical, and possibly not a lot of fun, relating more to improving the layout of the code.
The next one should be more enjoyable… hopefully later in the week!
December 17, 2018 at 5:56 am #15702January 6, 2019 at 11:12 pm #15859Hi all,
I’ve finally published my latest article!
Monkeying Around with mojo3d: more Behaviours… with bullets!
This one simply adds bullets and ground markers, along with a bunch of tweaks to improve the plane’s control, and you can try it in-browser here:
It’s quite in-depth, so I think you would definitely need to be reading along with the source code in order to make sense of it!
The last post in the series will be to address how the markers work, as these are interesting simply for how they allow management of non-physics entities in the scene.
After that, I’ll probably go back to basics and do a simple intro to mojo3d, as there has been a fair bit of interest lately. (Relatively speaking!)
January 8, 2019 at 5:35 am #15861Following on from the above, I’ve posted the final piece of the puzzle. (For now!)
Monkeying Around with mojo3d: Behaviours for simple entity management
This covers the creation of the little white ground markers, showing how Behaviours can be used to manage lots of objects, including those without any physics components, without the need to manually manage lists of entities. You simply place the Behaviour-ised entity in the scene and leave it to update itself.
(Scene.Update, in the main OnRender loop, will call Behaviour.OnUpdate for all entities with behaviours attached.)
Note that there are no manual references kept to the markers whatsoever — markers are created by BulletBehaviour upon impact with the ground, then… that’s it!
In this case, the marker behaviour records the time it’s created, and on each call to Scene.Update, checks if it’s existed for longer than a second. If it has, it deletes itself from the scene.
I’ll try get around to doing some basic mojo3d intro posts in the near-ish future…
Try the demo in the post above if you haven’t already!
January 8, 2019 at 1:38 pm #15862 -
AuthorPosts
You must be logged in to reply to this topic.