Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vehicle physics example #2317

Merged
merged 3 commits into from
Jul 27, 2020
Merged

Add vehicle physics example #2317

merged 3 commits into from
Jul 27, 2020

Conversation

willeastcott
Copy link
Contributor

@willeastcott willeastcott commented Jul 27, 2020

Adds a new vehicle physics example to the engine. It is based on the btRaycastVehicle API in ammo.js. The example creates a regular dynamic, compound collision body and augments it to be a raycast vehicle.

car-basic

The example also adds some additional scripts:

  • A tracking camera script that simply looks at a specified target entity as it moves around.
  • A reset physics script which will reset all dynamic rigid bodies back to their start position/rotation on pressing the R key.

There is also an Editor project that uses the same scripts to implement a graphically more interesting scene:

car-buggy3

It is available here:

https://playcanvas.com/project/643289/overview/vehicle-physics

I confirm I have signed the Contributor License Agreement.

@willeastcott willeastcott added enhancement area: physics Physics related issue labels Jul 27, 2020
@willeastcott willeastcott requested a review from a team July 27, 2020 12:57
@willeastcott willeastcott self-assigned this Jul 27, 2020
Copy link
Contributor

@mvaligursky mvaligursky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one!

@willeastcott willeastcott merged commit 08a6246 into master Jul 27, 2020
@willeastcott willeastcott deleted the vehicle branch July 27, 2020 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: physics Physics related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants