• Content count

  • Joined

  • Last visited

  • Days Won


samid737 last won the day on April 18 2017

samid737 had the most liked content!


About samid737

  • Rank
    Advanced Member
  • Birthday February 12

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    The Netherlands

Recent Profile Visitors

2,083 profile views
  1. This plugin will help you build paths for tweens and followers. Draw and edit Lines, Bezier Curves, Splines and Ellipses at runtime and export them to Phaser. A useful tool for editing and building paths. Draw your path in-game during runtime. Export path as JSON Data. Load them into Phaser and create awesome animations using pathfollowers! More cool features will be added soon! Demo. Src & Docs NPM
  2. P2 physics momentum transfer

    body.velocity.magnitude I meant. Speed is the magnitude of velocity, it is an absolute value. They are different things. When you are going fast, you say I have high speed, but when you add the extra detail of direction (up and left), you talk in terms of velocity. With speed you don't need to worry about directions, which makes it more convenient in your case. Two cars approaching each other at the same high speed (100 km/h), have completely different (opposite) velocities (100 and -100).
  3. P2 physics momentum transfer

    You could use speed instead of velocity as A basic measure: before.body.speed - after.body.speed Also don't forget that mass would also play A role (unless the bodies have equal mass), so you could consider A lower (relative) damage for heavier objects.
  4. Background Selector

    Here is one way, using sprites instead of background images:
  5. Moving the Clock Minute and Hour Hand

    An example to support : You can adjust the minute dial by incrementing, but the hour dial can be set if you know the amount of minutes passed. The same can be done vice versa. The problem with the stuck dial is that the angles are wrapped between 180 and -180 and when you go from 10 o 'clock to 8, the difference is 170 - (-170), so the difference becomes large and reverses sign and goes haywire. Its pretty tedious to solve, but most of the time you can add 180 to the calculated angle. Hope this helps.
  6. Moving the Clock Minute and Hour Hand

    You could multiply the angle change with the sign of the current angle: minute.angle += Math.sign(minute.angle) * 6 Or adding 180 to the pointer angle to deal with the wrapping. Instead of using increments I would count the minutes and set the hours according to the minutes , 24h = 1440 minutes. h = (m/1440)*360*2 +90.
  7. Adding tween targets to existing tween

    Added the wrong fiddle (updated above):
  8. Adding tween targets to existing tween

    You could re-target tweens by editing the tweenData directly: Adding targets should be possible too by fiddling with the tweenData, but I think you have to manually keep track of tween.totalData (the length of the tween data array) , since totalData is cached when adding A tween.
  9. UPDATE: Auto Manoeuvring implemented using Bezier curves in Phaser 3. Read the full details here:
  10. Como usar a função moveToPointer() com corpo P2JS?

    under the hood, moveToPointer works the same way for P2 bodies.
  11. Scramble JS is A 2D combat flight simulator for desktop browsers, made in Phaser 3. I started this project in early 2017 (using Phaser 2), which evolved from pure experimentation and love for flight sims. I decided to log the progress about 5 months ago. The features and modeling steps are described in detail within each log: Ultimately and ideally, the first release should have: - Different weather conditions, time, location(carrier, airbase). - Mission editor, ground targets (tanks, SAM, scenery objects) and air targets (aircraft, balloons). - A free flight mode. - Scramble mode (random scramble mission: interception of an unknown aircraft, leading to different actions). - Training mode (take-off, landing, basic manoeuvring, combat manoeuvre, combat training) If you would like to receive the dev logs regularly, please subscribe via the form found in the dev log or click here! :^: | | |O| | | /| |\ / | | \ / | | \ /___| |___\ ||| /|||\ |/`+'\|
  12. Adding setZoomFactor

    An alternative way of adding an extra camera allows you to ignore (UI) objects:
  13. I can't find the bugs in my code

    Please provide the code, we cannot help you without it.
  14. Dot move with trail

    you could try to make An array containing the points of each cross, then tween those points, and while tweening, decrease alpha according to the progress of the tween. You could still use A rendertexture in this case and trigger rendering when each cross is reached, or just continously draw the texture and match the alpha with the percent of the tween: line.alpha = (1- tween.timeline[0].percent);
  15. Dot move with trail

    There are alternatives, each their own benefit. You could use rendertextures, but dealing with alpha would be trickier. Creating motion paths is another way. It should be possible to set the alpha according to the position of each blob: