Back to Browse

its magic screen rotation tutorial | its magic charator tutorial | movement tutorial in its magic

3.0K views
Oct 16, 2023
4:30

Hello Everyone... I'm "Himel" How're you my viewer I hope all of fine. Welcome to UnderGamer YouTube channel. Code:--------------------------------------- ________update code________ public SpatialObject player; public SUIJoystick joystick; private Vector2 jstick; public float speed; //rotate x public SUISlideArea slide; public Vector2 sld; public float rotatespeed; /// Run only once @Override public void start() { speed = 20; rotatespeed = 20; } /// Repeat every frame @Override public void repeat() { jstick = joystick.getAxis().getValue(); player.getTransform().moveInSeconds(-jstick.getX()*speed, 0, jstick.getY()*speed); //rotate x sld = slide.getAxis().getValue(); player.getTransform().rotateInSeconds(0, -sld.getX()*rotatespeed, 0); } ________displayy code________ /** * @Author Unknow user */ public SpatialObject cam; public float angle; public float min; public float max; public float cos; public float sin; public SUISlideArea slide; public Axis axis = null; public float rspeed; /// Run only once @Override public void start() { } /// Repeat every frame @Override public void repeat() { angle += slide.getAxis().getValue().getY()*rspeed*Math.bySecond(); angle = Math.clamp(min, angle, max); sin = Math.sin(-angle); cos = Math.cos(-angle); cam.getTransform().getRotation().selfLookTo(new Vector3(0, sin, cos)); if(axis== null){ axis = slide.getAxis(); } } --------------------------------------- Engine: ITsMagic Channel : https://youtube.com/channel/UCPa4JNZcmSn11jHuHWew9gA Sketcfab : https://sketchfab.com/mitrohemel One L I K E 👍 One S U B S C R I B E 🔔 And S H A R E💕

Download

0 formats

No download links available.

its magic screen rotation tutorial | its magic charator tutorial | movement tutorial in its magic | NatokHD