pretty cool!
qubodup
Creator of
Recent community posts
Thanks! Without your question I probably wouldn't have figured out how to rotate anything at all.
Using your code, changing the left/right to the following made rotation and forward movement seem ok at fist:
if (Sup.Input.isKeyDown("LEFT")) {
this.actor.rotateLocal(new Sup.Math.Quaternion(0, 0.01, 0));
}
if (Sup.Input.isKeyDown("RIGHT")) {
this.actor.rotateLocal(new Sup.Math.Quaternion(0, -0.01, 0));
}
but when using larger values or starting off with one huge rotation, the model gets squished together:
Full code (assumes "CatTankHead" 3d model exists):
let mainCharacterActor = new Sup.Actor("CatTankHead");
// Tell our actor to dress in a 3d model
new Sup.ModelRenderer(mainCharacterActor, "CatTankHead");
// Summon a second person on stage, that'll be the camera
let cameraActor = new Sup.Actor("Camera1");
// Give the person a camera
new Sup.Camera(cameraActor);
// Place our actors. The main character actor is at the center of the stage
mainCharacterActor.setPosition(0, -1, -4);
// The camera person will be looking at the main actor from a distance
cameraActor.setPosition(0, 0, 5);
class CatBehavior extends Sup.Behavior {
awake() {
this.actor.rotateLocal(new Sup.Math.Quaternion(0, 0, 0));
}
update() {
if (Sup.Input.isKeyDown("LEFT")) {
this.actor.rotateLocal(new Sup.Math.Quaternion(0, 0.1, 0));
}
if (Sup.Input.isKeyDown("RIGHT")) {
this.actor.rotateLocal(new Sup.Math.Quaternion(0, -0.1, 0));
}
if (Sup.Input.isKeyDown("UP")) {
this.actor.moveOriented(0,0,0.1);
}
if (Sup.Input.isKeyDown("DOWN")) {
this.actor.moveOriented(0,0,-0.1);
}
}
}
mainCharacterActor.addBehavior(CatBehavior);
Hi, I'm trying to make a little game in Superpowers HTML5 but testing has been annoying: the color change, fade, banner, loading bar, fade are distracting my already challenged non-programmer mind. The waiting is annoying already but having the distractions kicks me even more out of the zone.
Loading screen: http://imgur.com/XpXxp9x
Can I make it so that the F5 Run Project function starts the game without start screen?
Thanks!





