pushで空中に浮かせたくない

push player forward at speed 1 この構文だと上を向いたときにプレイヤーが宙を浮いてしまいます。 やりたいこと apexみたいにしゃがむとスライドがかかるように
Solution:
もしかしてこれか
No description
Jump to solution
30 Replies
akon
akon6mo ago
遠回りだけどset velocityで解決
nennneko5787
nennneko5787OP6mo ago
今こんな感じなんですけど、これだと4方位にしか対応できてないです…
No description
akon
akon6mo ago
@egge
tanoKun
tanoKun6mo ago
y軸固定したベクトルでいいんじゃね
あお🦀
あお🦀6mo ago
on sneak toggle:
player is not sneaking
player is on ground
set {_location} to location of player
set {_direction} to vector in direction of player
set standard length of {_direction} to 1
set {_loc} to {_location} offset by {_direction}
set y of {_direction} to 0
set player's velocity to normalized {_direction}
on sneak toggle:
player is not sneaking
player is on ground
set {_location} to location of player
set {_direction} to vector in direction of player
set standard length of {_direction} to 1
set {_loc} to {_location} offset by {_direction}
set y of {_direction} to 0
set player's velocity to normalized {_direction}
プレイヤーの視点に速度が左右されてしまうので最適解ではないかもしれませんが、スライド的なことはできます normalizeすることにより解決
何か
何か6mo ago
なんかこう、 頑張ってください。 はい。 👌
tanoKun
tanoKun6mo ago
normalize すれば問題ないよ
nennneko5787
nennneko5787OP6mo ago
vector in direction of player ここでエラー
あお🦀
あお🦀6mo ago
環境です
No description
nennneko5787
nennneko5787OP6mo ago
2.6.3じゃできないのかなあ?
あお🦀
あお🦀6mo ago
https://skripthub.net/docs/?id=10169 ぽいです...すいません
Skript Hub - Documentation
Vectors - Create from Direction (Expression) - Skript
Creates vectors from given directions. Relative directions are relative to the origin, (0, 0, 0). Therefore, the vector from the direction 'forwards' is (0, 0, 1).
nennneko5787
nennneko5787OP6mo ago
おいおいまじかよ…
あお🦀
あお🦀6mo ago
https://skripthub.net/docs/?id=6586 https://skripthub.net/docs/?id=6630 動作が同じ感じかはわかりませんが使えるかもしれないです
Skript Hub - Documentation
Entity Direction (Expression) - Skirt
Returns the direction of an entity or location as a vector, similar to vector from location's yaw and pitch. Can be set
Skript Hub - Documentation
Vector from direction (Expression) - Skirt
Converts a skript direction to a vector, useful if you want to manipulate a direction
nennneko5787
nennneko5787OP6mo ago
Skirtは未導入ですね
akon
akon6mo ago
おい解決したようには見えないぞ
akon
akon6mo ago
Skript Hub - Documentation
Direction (Expression) - Skript
A helper expression for the direction type.
nennneko5787
nennneko5787OP6mo ago
これの使い方がいまいちわかってない
akon
akon6mo ago
@egge
何か
何か6mo ago
?
akon
akon6mo ago
使い方教えてあげて
何か
何か6mo ago
thrust the player upwards set the block behind the player to water loop blocks above the player: set {_rand} to a random integer between 1 and 10 set the block {_rand} meters south east of the loop-block to stone block in horizontal facing of the clicked entity from the player is air spawn a creeper 1.5 meters horizontally behind the player spawn a TNT 5 meters above and 2 meters horizontally behind the player thrust the last spawned TNT in the horizontal direction of the player with speed 0.2 push the player upwards and horizontally forward at speed 0.5 push the clicked entity in in the direction of the player at speed -0.5 open the inventory of the block 2 blocks below the player to the player teleport the clicked entity behind the player grow a regular tree 2 meters horizontally behind the player 👌
akon
akon6mo ago
すばらしい
月猫ch
月猫ch6mo ago
🤖<vectorのxとz数値を取得して、yが0のvectorを新たに作ればいいのに……
KabiPan
KabiPan6mo ago
🤖<現在のvectorか視点のvectorを取得して、yを0にして正規化したvectorを作ればいいのに......
akon
akon6mo ago
元の奴にひとつ加えるだけでいいんだよなぁ
___
___6mo ago
horizontal?
nennneko5787
nennneko5787OP6mo ago
どっちもわかりません ベクトル系は今まであまり触ったことなかったので
___
___6mo ago
この中に答えがあるじゃない
Solution
nennneko5787
nennneko57876mo ago
もしかしてこれか
No description
nennneko5787
nennneko5787OP6mo ago
解決した、皆さんありがとう
Want results from more Discord servers?
Add your server