Design Flying Robot For Decentraland. MANA Coin. Using SketchPad.

in #flying6 years ago (edited)

Hello everyone. I got some assistance from the good community out in Decentraland. Make sure you join their Discord group and twitter. Here is what I learned today. How to make a robot fly side-to-side and up.

For Full YouTube Video: Click Here

That is all for today ladies and gentlemen. Once again I will go into detail and commentary on these topics later on today. Please watch for new videos on the YouTube channel and on Steemit as well.


Nick is a content creator for Sobuka with a background in programming, information technology, finance and digital forensics. He shares interest in cryptocurrencies by reporting on International Affairs. You can find myself, B, and Laura here from time to time.


Support the cause if you like what we say here on Sobuka

MANA (Obviously): 0xbc96793647728de43206cb925e7d3ab68352009f

BTC: 16wWyinHnue6fwoszr6kKsZfuyYacf2wxQ

ETC: 0x99BcEa1266D2ed8ABAc754035a49B7F80412812e

LTC: LUeqoRJ5sR6Hzy3p7EHcwwWf9v81XQu7oE

You can reach the team here

Facebook
Twitter
YouTube
Steemit: @Sobuka

Disclaimer
The information on this blog is not financial advice. Before you invest in cryptocurrencies, please speak to a financial advisor.

Flying Side to Side

import { createElement, ScriptableScene } from "metaverse-api";

interface State {
counter: number
}

export default class SharkAnimation extends ScriptableScene {

state:State = { counter:0
};

async sceneDidMount() {
    this.eventSubscriber.on(`supershark_click`, () => 
    
    { setInterval(() =>
        {
          this.setState({ counter: this.state.counter + 1 })
        },1000)
    });
}

async render() {
    const barScale = {
      x: 5 + this.state.counter,
      y: 1.5,
      z: 1*Math.cos(this.state.counter)
    }
            
    return (
        <scene>
            <gltf-model
                id="supershark"
                position={barScale}
                scale={0.042}
                src="models/scene.gltf"
            />
        </scene>
    );
}

}

Flying Up

import { createElement, ScriptableScene } from "metaverse-api";
interface State {
counter: number
}

export default class SharkAnimation extends ScriptableScene {

state:State = { counter:0
};

async sceneDidMount() {
    this.eventSubscriber.on(`supershark_click`, () => 
    
    { setInterval(() =>
        {
          this.setState({ counter: this.state.counter + 1 })
        },1000)
    });
}

async render() {
    const barScale = {
      x: 5,
      y: 1.5 + this.state.counter,
      z: -5
    }
            
    return (
        <scene>
            <gltf-model
                id="supershark"
                position={barScale}
                scale={0.042}
                src="models/scene.gltf"
            />
        </scene>
    );
}

}