Ok got the stars appearing infront of the camera very effectively. I have 200 sprites now and the effect when turning is very realistic.
I understand there's likely a faster way, but after 24 hours, this is where it stands.
Teff
Function update_stars()
If MilliSecs() > timer2 + 100
timer2=MilliSecs() : theta=50
For i=1 To numstars
st=stars(i)
If EntityInView(st,camera)=0
EntityParent st,camera
PositionEntity st,EntityX(camera),EntityY(camera),EntityZ(camera),1
RotateEntity st,EntityX(st)+Rand(-theta,theta),EntityY(st)+Rand(-theta,theta),1
EntityParent st,0
MoveEntity st,0,0,Rand(500)+1500
EndIf
Next
EndIf
End Function
I understand there's likely a faster way, but after 24 hours, this is where it stands.
Teff
Function update_stars()
If MilliSecs() > timer2 + 100
timer2=MilliSecs() : theta=50
For i=1 To numstars
st=stars(i)
If EntityInView(st,camera)=0
EntityParent st,camera
PositionEntity st,EntityX(camera),EntityY(camera),EntityZ(camera),1
RotateEntity st,EntityX(st)+Rand(-theta,theta),EntityY(st)+Rand(-theta,theta),1
EntityParent st,0
MoveEntity st,0,0,Rand(500)+1500
EndIf
Next
EndIf
End Function