test jump (not working)
This commit is contained in:
parent
da2645aa0d
commit
6c5b34ffe8
|
@ -210,12 +210,20 @@ const loadModels = async () => {
|
||||||
|
|
||||||
const { onAfterRender } = useLoop()
|
const { onAfterRender } = useLoop()
|
||||||
onAfterRender(() => {
|
onAfterRender(() => {
|
||||||
|
let i = 0.01
|
||||||
clickable_refs.value.map(el => {
|
clickable_refs.value.map(el => {
|
||||||
|
// i += 2
|
||||||
if (el.value[0].children[0] && typeof el.value[0].children[0].lookAt == 'function') {
|
if (el.value[0].children[0] && typeof el.value[0].children[0].lookAt == 'function') {
|
||||||
el.value[0].children[0].lookAt(camera.value?.position);
|
el.value[0].children[0].lookAt(camera.value?.position);
|
||||||
el.value[0].children[1].lookAt(camera.value?.position);
|
el.value[0].children[1].lookAt(camera.value?.position);
|
||||||
// el.value[0].updateMatrixWorld()
|
|
||||||
}
|
}
|
||||||
|
if (el.value[0].children[1].position.y < 50 && el.value[0].children[1].position.y > 20) {
|
||||||
|
el.value[0].children[1].position.y -= i
|
||||||
|
} else if (el.value[0].children[1].position.y > 20) {
|
||||||
|
el.value[0].children[1].position.y += i
|
||||||
|
}
|
||||||
|
// el.value[0].updateMatrixWorld()
|
||||||
|
el.value[0]._needsUpdate = true
|
||||||
})
|
})
|
||||||
if (controls.value) {
|
if (controls.value) {
|
||||||
if (timer.value == 0) {
|
if (timer.value == 0) {
|
||||||
|
|
Loading…
Reference in New Issue