-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Some trigonometric functions would be quite useful.
Meteor and Starscript don't necessarily need to be used for cheating (or perhaps you can nag the server owner for op, if they're foolish enough), and I needed the facing vector of the player to spawn an arrow with a velocity set to where the player is facing. While I managed to approximate it with Taylor series, it's very verbose and it'd be much nicer to write sin(), cos() and tan() instead:
/summon fireball ~ ~ ~ {"{"}Motion:[
{round(-( (player.yaw*PI/180) -((player.yaw*PI/180)^3)/6 +((player.yaw*PI/180)^5)/120)* ( 1-((player.pitch*PI/180)^2)/2+((player.pitch*PI/180)^4)/24)*1.5,2)},
{round( -( (player.pitch*PI/180) -((player.pitch*PI/180)^3)/6 +((player.pitch*PI/180)^5)/120)*1.5,2)},
{round( ( 1-((player.yaw*PI/180)^2)/2+((player.yaw*PI/180)^4)/24)* ( 1-((player.pitch*PI/180)^2)/2+((player.pitch*PI/180)^4)/24)*1.5,2)}
]{"}"}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels