Create Your First PlayCanvas Project
This document provides a guide for creating a project in PlayCanvas that can be published to VIVERSE
Last updated
Was this helpful?
This document provides a guide for creating a project in PlayCanvas that can be published to VIVERSE
Last updated
Was this helpful?
Make sure to disable any camera/character control entity in the scene. As it might conflict with VIVERSE avatar system.
Create a game with floor and walls. Use your avatar to move the ball around.
A. Select the Plane entity and rename it Floor.
B. To increase the size of the Floor, change the Scale to (20, 1, 20).
C. To allow the players to collide with the Floor, add a Collision component.
D. To increase the size of the Collision component so that it covers the entire Floor, change Half Extents to (10, .1, 10).
E. To prevent the players from falling through the Floor, add a Rigidbody component.
F. Click the Import Ammo button.
A. Create a new folder and name it Materials.
B. Inside the Materials folder, create a new material and name it FloorMaterial.
C. Expand the Diffuse section and click the Color field.
D. For the Color, change the values to (97, 255, 104).
E. Add the FloorMaterial to the Material slot on the Floor entity.
A. Select the Box entity and rename it to Wall1.
B. To move the wall to the side, change the Position to (0, 0, 10).
C. To increase the size of the wall, change Scale to (20, 5, .1).
D. To allow the players to collide with the wall, add a Collision component.
E. To increase the size of the Collision component so that it covers the entire wall, change Half Extents to (10, 2.5, .1).
F. To prevent the players from going through the wall, add a Rigidbody component.
A. Add a 3D Sphere to the scene. Rename it to Ball.
B. Raise the Ball above the ground by changing Position to (0, 1, 0).
C. To allow the players to collide with the Ball, add a Collision component.
D. To change the collider shape to be the same shape as the Ball, change Type to Sphere.
E. To prevent players from passing through the Ball, add a Rigidbody component.
F. Since the Ball will be moving, change the Type to Dynamic.
G. Decrease the Friction to .1 so that the Ball doesn't lose as much velocity when coming in contact with other entities.
H. Increase the Restitution to 1 to maximize the bounciness of the Ball.
A. Add a new Entity to the scene. Rename the entity to SpawnPoint.
B. Add spawn-point
to the Tags field.
C. To have the spawn point above the ground and close to the wall, change the Position to (0, 1, 8).
D. To change the direction of the SpawnPoint so that the player will face the ball when spawned in, change Rotation to (0, 180, 0).