I need help with vec3 and i need to throw a bannana

var Bannana = pc.createScript('bannana');

// initialize code called once per entity
Bannana.prototype.initialize = function() {
    const bannanathrow = new pc.Vec3(0, 10, 0);
};

// update code called every frame
Bannana.prototype.update = function(dt) {
    
};

// swap method called for script hot-reloading
// inherit your script state here
// Bannana.prototype.swap = function(old) { };

// to learn more about script anatomy, please read:
// https://developer.playcanvas.com/en/user-manual/scripting/

Hi @Kayden_Dougherty,

Check this tutorial on how to apply forces and impulses and throw your banana :banana::

https://developer.playcanvas.com/en/tutorials/Using-forces-on-rigid-bodies/

1 Like