ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator How to move cube with physics
person icon
c123
Registered User
Quote
2023-06-26 14:18:43

I'm making a physics-based game in which you control a cube.
I've given the cube affected by physics engine and a player controller but since that doesn't work I tried to use the ccsetveloctiy command but I can't seem to figure out how to use it. I need help in making the cube move in forward, backwards, left and right and also jump. Having the cube rotate it the direction it moves will also be very nice. Could someone help me?
Link to file: https://backlash-game-studios.itch.io/cube-project

person icon
Guest
Guest
Quote
2023-06-27 00:38:01

Make sure you go to Tools > Publish settings > Physics Engine and change it to Physics simulation.

Change your code to this:
var main = ccbGetSceneNodeFromName("main");
ccbSetPhysicsVelocity(main, 0,30,0);

Cube should jump now.

Recommend you read the documentation if you have not:
https://www.ambiera.com/coppercu...

person icon
c123
Registered User
Quote
2023-06-27 12:35:31

It works now, thank you very much.

person icon
zeedom
Guest
Quote
2024-04-01 07:19:03

where i can edit physics engine script


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |