Scirra / Construct-bugs

Public bug report submissions for Construct 3 and Construct Animate. Please read the guidelines then click the 'Issues' tab to get started.
https://www.construct.net
107 stars 83 forks source link

R123 - Tween Behavior - When using "Elastic" easing the value goes to "NaN" if target value and start value are equal #2201

Closed Fib100 closed 5 years ago

Fib100 commented 5 years ago

Problem description

When tweening any value (this includes all tweenable properties) and using "Elastic" as the easing (in, out, and in-out) and the target value is equal to the end value, the value goes to "NaN".

In my example I'm using the value tween. But I've also tested it with the other properties such as X, Y, Width, Height, and Angle and have observed the same result. The core issue seems to lie with the Elastic easing option.

Attach a .c3p

tween_elastic_easing_bug.c3p

Steps to reproduce

  1. Download the c3p file then load it in Construct 3 R123
  2. Run the project
  3. Observe the text object showing "NaN" as the value

Observed result

The value of the property goes to "NaN".

Expected result

If the start value and the target value are equal, then the value should remain the same (ex: start = 100, target = 100, then the result should remain at 100)

Affected browsers

System details

View details Platform information Browser: Chrome Browser version: 70.0.3538.77 Browser engine: Blink Browser architecture: 64-bit Context: browser Operating system: Windows Operating system version: 10 Operating system architecture: 64-bit Device type: desktop Device pixel ratio: 1 Logical CPU cores: 8 Approx. device memory: 8 GB User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 C3 release: r123 (beta) Language setting: en-US Local storage Storage quota (approx): 7.9 gb Storage usage (approx): 140 mb (1.7%) Persistant storage: Yes Browser support notes This list contains missing features that are not required, but could improve performance or user experience if supported. Nothing is missing. Everything is OK! WebGL information Version string: WebGL 2.0 (OpenGL ES 3.0 Chromium) Numeric version: 2 Supports NPOT textures: yes Supports GPU profiling: yes Vendor: Google Inc. Renderer: ANGLE (Intel(R) HD Graphics 530 Direct3D11 vs_5_0 ps_5_0) Major performance caveat: no Maximum texture size: 16384 Point size range: 1 to 1024 Extensions: EXT_color_buffer_float EXT_disjoint_timer_query_webgl2 EXT_texture_filter_anisotropic OES_texture_float_linear WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context Audio information System sample rate: 48000 Hz Output channels: 2 Output interpretation: speakers Supported decode formats: Ogg Opus (audio/ogg; codecs=opus) WebM Opus (audio/webm; codecs=opus) Ogg Vorbis (audio/ogg; codecs=vorbis) WebM Vorbis (audio/webm; codecs=vorbis) MPEG-4 AAC (audio/mp4; codecs=mp4a.40.5) MP3 (audio/mpeg) FLAC (audio/flac) PCM WAV (audio/wav; codecs=1) Supported encode formats: WebM Opus (audio/webm; codecs=opus) Video information Supported decode formats: WebM VP9 (video/webm; codecs=vp9) WebM VP8 (video/webm; codecs=vp8) Ogg Theora (video/ogg; codecs=theora) H.264 (video/mp4; codecs=avc1.42E01E) Supported encode formats: WebM VP9 (video/webm; codecs=vp9) WebM VP8 (video/webm; codecs=vp8)
DiegoScirra commented 5 years ago

Fixed, will be available in the next release.

Fib100 commented 5 years ago

Thank you for the quick response!